7 #include "TPrincipal.h"
18 namespace single_photon
25 std::vector<PandoraPFParticle> all_PPFPs,
27 std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::SpacePoint>>> & pfParticleToSpacePointsMap,
28 std::map<
int, art::Ptr<simb::MCParticle> > & MCParticleToTrackIdMap,
29 std::map<int, double> &sliceIdToNuScoreMap,
48 for (TrackVector::const_iterator iter =
tracks.begin(), iterEnd =
tracks.end(); iter != iterEnd; ++iter)
51 const art::Ptr<recob::Track>
track = *iter;
54 const art::Ptr<recob::PFParticle> pfp = ppfp->
pPFParticle;
56 const std::vector< art::Ptr<recob::SpacePoint> > trk_spacepoints = pfParticleToSpacePointsMap[pfp];
57 const std::vector<art::Ptr<recob::Hit>> trk_hits = ppfp->
pPFPHits;
59 int m_trkid = track->ID();
60 double tem_length = track->Length();
61 auto tem_trk_dir = track->Direction();
64 if(
g_is_verbose)
std::cout<<
"AnalyzeTracks()\t||\t On Track: "<<i_trk<<
" with TrackID: "<<m_trkid<<
" and length: "<<tem_length<<
""<<std::endl;;
105 double max_dist_from_line = -9999999;
112 TPrincipal* principal;
113 principal =
new TPrincipal(3,
"ND");
116 std::vector<double> tmp_spacepoints = {trk_spacepoints[
x]->XYZ()[0],trk_spacepoints[
x]->XYZ()[1] , trk_spacepoints[
x]->XYZ()[2]};
117 principal->AddRow(&tmp_spacepoints[0]);
121 if(dist> max_dist_from_line) max_dist_from_line =
dist;
126 principal->MakePrincipals();
127 TVectorD * eigen = (TVectorD*) principal->GetEigenValues();
168 int pfp_size = all_PPFPs.size();
169 for(
int index = 0; index < pfp_size; index++){
170 if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()){
191 size_t const traj_size = track->CountValidPoints();
194 for(
unsigned int p = 0;
p < traj_size; ++
p) {
218 if(
g_is_verbose)
std::cout<<
"CollectCalo(recob::Track)\t||\t Starting calo module for recob::Track"<<std::endl;;
220 for(
size_t i_trk = 0; i_trk<
tracks.size(); ++i_trk){
221 const art::Ptr<recob::Track>
track =
tracks[i_trk];
226 std::cout<<
"Singlephoton::Tracks\t||\tERROR!! ERROR!!! anab::Calorimetery vector is not of length 3!!! "<<Calos.size()<<
". Skipping this track!!"<<std::endl;
234 const art::Ptr<anab::Calorimetry> calo_p0 = Calos[0];
235 const art::Ptr<anab::Calorimetry> calo_p1 = Calos[1];
236 const art::Ptr<anab::Calorimetry> calo_p2 = Calos[2];
239 size_t calo_length_p0 = calo_p0->dEdx().size();
240 size_t calo_length_p1 = calo_p1->dEdx().size();
241 size_t calo_length_p2 = calo_p2->dEdx().size();
247 std::vector<double> trunc_dEdx_p0;
248 std::vector<double> res_range_good_p0;
249 std::vector<double> dEdx_good_p0;
251 std::vector<double> trunc_dEdx_p1;
252 std::vector<double> res_range_good_p1;
253 std::vector<double> dEdx_good_p1;
255 std::vector<double> trunc_dEdx_p2;
256 std::vector<double> res_range_good_p2;
257 std::vector<double> dEdx_good_p2;
297 for (
size_t k = 0;
k < calo_length_p0; ++
k) {
298 double res_range = calo_p0->ResidualRange()[
k];
299 double dEdx = calo_p0->dEdx()[
k];
302 if(
k <= calo_length_p0/2){
309 bool is_nan =dEdx !=
dEdx;
310 bool is_inf = std::isinf(dEdx);
313 if(is_sensible && !is_nan && !is_inf && is_nonzero &&
k != 0 &&
k != calo_length_p0-1){
314 res_range_good_p0.push_back(res_range);
315 dEdx_good_p0.push_back(dEdx);
328 for(
int j = res_range_good_p0.size()-1; j>1; j--){
329 double dx = fabs(res_range_good_p0[j]-res_range_good_p0[j-1]);
330 if(dx < min_dx) min_dx = dx;
332 double rad = std::max( min_dx*2, tenth_track);
338 double pida_sum_trunc=0.0;
340 for(
size_t k=0;
k< trunc_dEdx_p0.size();
k++){
341 double dEdx = trunc_dEdx_p0[
k];
343 if(
k <= trunc_dEdx_p0.size()/2){
350 if(trunc_dEdx_p0[
k] != trunc_dEdx_p0[
k] || std::isinf(trunc_dEdx_p0[
k]) || trunc_dEdx_p0[
k]<0){
351 std::cout<<
"Truncated dedx is either inf or nan (or negative) @ "<<k<<
" "<<trunc_dEdx_p0[
k]<<std::endl;
352 std::cout<<
"Vector Length : "<<trunc_dEdx_p0.size()<<std::endl;
353 std::cout<<
"i\t range \t dedx \t trunc dedx"<<std::endl;
357 std::cout<<
"Using Radius: "<<rad<<std::endl;
363 pida_sum_trunc += trunc_dEdx_p0[
k]/(pow(res_range_good_p0[k],-0.42));
383 for (
size_t k = 0;
k < calo_length_p1; ++
k) {
384 double res_range = calo_p1->ResidualRange()[
k];
385 double dEdx = calo_p1->dEdx()[
k];
388 if(
k <= calo_length_p1/2){
395 bool is_nan =dEdx !=
dEdx;
396 bool is_inf = std::isinf(dEdx);
399 if(is_sensible && !is_nan && !is_inf && is_nonzero &&
k != 0 &&
k != calo_length_p1-1){
400 res_range_good_p1.push_back(res_range);
401 dEdx_good_p1.push_back(dEdx);
414 for(
int j = res_range_good_p1.size()-1; j>1; j--){
415 double dx = fabs(res_range_good_p1[j]-res_range_good_p1[j-1]);
416 if(dx < min_dx) min_dx = dx;
418 double rad = std::max( min_dx*2, tenth_track);
424 double pida_sum_trunc=0.0;
426 for(
size_t k=0;
k< trunc_dEdx_p1.size();
k++){
427 double dEdx = trunc_dEdx_p1[
k];
429 if(
k <= trunc_dEdx_p1.size()/2){
436 if(trunc_dEdx_p1[
k] != trunc_dEdx_p1[
k] || std::isinf(trunc_dEdx_p1[
k]) || trunc_dEdx_p1[
k]<0){
437 std::cout<<
"Truncated dedx is either inf or nan (or negative) @ "<<k<<
" "<<trunc_dEdx_p1[
k]<<std::endl;
438 std::cout<<
"Vector Length : "<<trunc_dEdx_p1.size()<<std::endl;
439 std::cout<<
"i\t range \t dedx \t trunc dedx"<<std::endl;
443 std::cout<<
"Using Radius: "<<rad<<std::endl;
448 pida_sum_trunc += trunc_dEdx_p1[
k]/(pow(res_range_good_p1[k],-0.42));
468 for (
size_t k = 0;
k < calo_length_p2; ++
k) {
469 double res_range = calo_p2->ResidualRange()[
k];
470 double dEdx = calo_p2->dEdx()[
k];
473 if(
k <= calo_length_p2/2){
480 bool is_nan =dEdx !=
dEdx;
481 bool is_inf = std::isinf(dEdx);
484 if(is_sensible && !is_nan && !is_inf && is_nonzero &&
k != 0 &&
k != calo_length_p2-1){
485 res_range_good_p2.push_back(res_range);
486 dEdx_good_p2.push_back(dEdx);
499 for(
int j = res_range_good_p2.size()-1; j>1; j--){
500 double dx = fabs(res_range_good_p2[j]-res_range_good_p2[j-1]);
501 if(dx < min_dx) min_dx = dx;
503 double rad = std::max( min_dx*2, tenth_track);
509 double pida_sum_trunc=0.0;
511 for(
size_t k=0;
k< trunc_dEdx_p2.size();
k++){
512 double dEdx = trunc_dEdx_p2[
k];
514 if(
k <= trunc_dEdx_p2.size()/2){
521 if(trunc_dEdx_p2[
k] != trunc_dEdx_p2[
k] || std::isinf(trunc_dEdx_p2[
k]) || trunc_dEdx_p2[
k]<0){
522 std::cout<<
"Truncated dedx is either inf or nan (or negative) @ "<<k<<
" "<<trunc_dEdx_p2[
k]<<std::endl;
523 std::cout<<
"Vector Length : "<<trunc_dEdx_p2.size()<<std::endl;
524 std::cout<<
"i\t range \t dedx \t trunc dedx"<<std::endl;
528 std::cout<<
"Using Radius: "<<rad<<std::endl;
533 pida_sum_trunc += trunc_dEdx_p2[
k]/(pow(res_range_good_p2[k],-0.42));
614 std::vector<PandoraPFParticle> all_PPFPs,
var_all& vars){
616 for(
size_t i_trk=0; i_trk<
tracks.size(); ++i_trk){
622 std::cout <<
"[analyze_Tracks] bad PID object" << std::endl;
629 std::vector<anab::sParticleIDAlgScores> AlgScoresVec = pid->ParticleIDAlgScores();
630 double pidScore_BL_mu_plane0 = -999;
631 double pidScore_BL_mu_plane1 = -999;
632 double pidScore_BL_mu_plane2 = -999;
633 double pidScore_BL_p_plane0 = -999;
634 double pidScore_BL_p_plane1 = -999;
635 double pidScore_BL_p_plane2 = -999;
636 double pidScore_BL_mip_plane0 = -999;
637 double pidScore_BL_mip_plane1 = -999;
638 double pidScore_BL_mip_plane2 = -999;
639 double pidScore_PIDA_plane0 = -999;
640 double pidScore_PIDA_plane1 = -999;
641 double pidScore_PIDA_plane2 = -999;
642 double pidScore_chi2_mu_plane0 = -999;
643 double pidScore_chi2_mu_plane1 = -999;
644 double pidScore_chi2_mu_plane2 = -999;
645 double pidScore_chi2_p_plane0 = -999;
646 double pidScore_chi2_p_plane1 = -999;
647 double pidScore_chi2_p_plane2 = -999;
648 double pidScore_three_plane_proton = -999;
651 for (
size_t i_algscore=0; i_algscore<AlgScoresVec.size(); i_algscore++) {
656 std::cout<<
"WARNING: planeid is not set properly; so please check if you think this section matters"<<std::endl;
666 if (planeid == 0) pidScore_BL_mu_plane0 = AlgScore.
fValue;
667 if (planeid == 1) pidScore_BL_mu_plane1 = AlgScore.
fValue;
668 if (planeid == 2) pidScore_BL_mu_plane2 = AlgScore.
fValue;
671 if (planeid == 0) pidScore_BL_p_plane0 = AlgScore.
fValue;
672 if (planeid == 1) pidScore_BL_p_plane1 = AlgScore.
fValue;
673 if (planeid == 2) pidScore_BL_p_plane2 = AlgScore.
fValue;
676 if (planeid == 0) pidScore_BL_mip_plane0 = AlgScore.
fValue;
677 if (planeid == 1) pidScore_BL_mip_plane1 = AlgScore.
fValue;
678 if (planeid == 2) pidScore_BL_mip_plane2 = AlgScore.
fValue;
683 if (planeid == 0) pidScore_chi2_mu_plane0 = AlgScore.
fValue;
684 if (planeid == 1) pidScore_chi2_mu_plane1 = AlgScore.
fValue;
685 if (planeid == 2) pidScore_chi2_mu_plane2 = AlgScore.
fValue;
688 if (planeid == 0) pidScore_chi2_p_plane0 = AlgScore.
fValue;
689 if (planeid == 1) pidScore_chi2_p_plane1 = AlgScore.
fValue;
690 if (planeid == 2) pidScore_chi2_p_plane2 = AlgScore.
fValue;
694 if (planeid == 0) pidScore_PIDA_plane0 = AlgScore.
fValue;
695 if (planeid == 1) pidScore_PIDA_plane1 = AlgScore.
fValue;
696 if (planeid == 2) pidScore_PIDA_plane2 = AlgScore.
fValue;
701 pidScore_three_plane_proton = AlgScore.
fValue;
732 void AnalyzeFlashes(
const std::vector<art::Ptr<recob::OpFlash>>& flashes, art::Handle<std::vector<sbn::crt::CRTHit>> crthit_h,
double evt_timeGPS_nsec, std::map<art::Ptr<recob::OpFlash>,
std::vector< art::Ptr<sbn::crt::CRTHit>>> crtvetoToFlashMap,
736 for(
auto pair: crtvetoToFlashMap){
737 std::cout<<
"for flash at time "<< pair.first->Time()<<
" has "<< pair.second.size() <<
" associated CRT hits "<<std::endl;
738 if(pair.second.size() > 0){
739 for (
auto hit: pair.second){
740 std::cout<<
"---- associated CRT hit at time "<<
hit->ts0_ns/1000. <<
" with PE "<<
hit->peshit<<std::endl;
751 size_t flash_size = flashes.size();
752 for(
size_t i = 0; i < flash_size; ++i) {
754 art::Ptr<recob::OpFlash>
const & flash = flashes[i];
784 int _nCRThits_in_event = crthit_h->size();
786 double _dt_abs = 100000.0;
791 for (
int j = 0; j < _nCRThits_in_event; j++)
797 double _crt_time_temp = ((crthit_h->at(j).ts0_ns - evt_timeGPS_nsec + paras.
s_DTOffset) / 1000.);
806 if (fabs(_beam_flash_time - _crt_time_temp) < _dt_abs)
808 _dt_abs = fabs(_beam_flash_time - _crt_time_temp);
809 vars.
m_CRT_dt = _beam_flash_time - _crt_time_temp;
842 std::vector<PandoraPFParticle> all_PPFPs,
843 const std::vector<art::Ptr<recob::Shower>>& showers,
844 std::map<art::Ptr<recob::Cluster>,
std::vector<art::Ptr<recob::Hit>> > & clusterToHitMap ,
845 double triggeroffset,
853 std::vector<int> spacers =
Printer_header({
"Slice",
" pfpID",
" Start(x, ",
" y, ",
" z )",
" trackscore",
" pdg"});
854 for (ShowerVector::const_iterator iter = showers.begin(), iterEnd = showers.end(); iter != iterEnd; ++iter)
858 const art::Ptr<recob::Shower>
shower = *iter;
862 const art::Ptr<recob::PFParticle> pfp = ppfp->
pPFParticle;
864 art::Ptr<recob::Shower> shower3d;
868 const std::vector<art::Ptr<recob::Hit>> hits = ppfp->
pPFPHits;
869 const std::vector<art::Ptr<recob::Cluster>> clusters = ppfp->
pClusters;
872 double tem_length = shower->Length();
873 double tem_open_angle = shower->OpenAngle();
875 TVector3 shr_start = shower->ShowerStart();
876 TVector3 shr_dir = shower->Direction();
878 TVector3 shr3d_start = shower3d->ShowerStart();
879 TVector3 shr3d_dir = shower3d->Direction();
913 std::vector<double> shr_ts = {shr_start.X(), shr_start.Y(), shr_start.Z()};
914 std::vector<double> shr_te = {shr_start.X()-shr_dir.X(),shr_start.Y()-shr_dir.Y(),shr_start.Z()-shr_dir.Z()};
928 std::vector<double> shr3d_ts = {shr3d_start.X(), shr3d_start.Y(), shr3d_start.Z()};
929 std::vector<double> shr3d_te = {shr3d_start.X()-shr3d_dir.X(),shr3d_start.Y()-shr3d_dir.Y(),shr3d_start.Z()-shr3d_dir.Z()};
953 std::vector<int> t_num(3,0);
954 std::vector<int> t_numhits(3,0);
955 std::vector<double> t_area(3,0.0);
981 const std::vector< double > shr3d_energy = shower3d->Energy();
982 const std::vector< double > shr3d_dEdx = shower3d->dEdx();
989 if(shr3d_energy.size()==3){
1003 if(shr3d_dEdx.size()==3){
1031 if(showers.size()==1){
1034 int plane=
h->View();
1035 int wire =
h->WireID().Wire;
1036 int tick =
h->PeakTime();
1061 std::vector< double > reco_shr_angles_wrt_wires;
1070 TVector3 wire_vector;
1071 if(
abs(angToVert) < 1
e-9 ){
1072 wire_vector = {0,0,1};
1074 wire_vector = { 0 , sin(angToVert) ,cos(angToVert) };
1078 reco_shr_angles_wrt_wires.push_back(
abs(0.5*M_PI-acos(wire_vector.Dot(shr_dir))) );
1080 if(reco_shr_angles_wrt_wires.size()==3)
break;
1169 if(zmin > zmax) std::swap(zmin, zmax);
1173 if(ymin > ymax) std::swap(ymin, ymax);
1177 double shortest_dist_to_flash_z=DBL_MAX;
1178 double shortest_dist_to_flash_y=DBL_MAX;
1179 double shortest_dist_to_flash_yz=DBL_MAX;
1181 int shortest_dist_to_flash_index_z=-999;
1182 int shortest_dist_to_flash_index_y=-999;
1183 int shortest_dist_to_flash_index_yz=-999;
1194 double dist_z=DBL_MAX;
1195 if(zcenter < zmin) {
1196 dist_z = zmin - zcenter;
1198 else if(zcenter > zmax) {
1199 dist_z = zcenter - zmax;
1204 if(dist_z < shortest_dist_to_flash_z){
1205 shortest_dist_to_flash_z = dist_z;
1206 shortest_dist_to_flash_index_z=i_flash;
1212 double dist_y=DBL_MAX;
1213 if(ycenter < ymin) {
1214 dist_y = ymin - ycenter;
1216 else if(ycenter > ymax) {
1217 dist_y = ycenter - ymax;
1222 if(dist_y < shortest_dist_to_flash_y){
1223 shortest_dist_to_flash_y = dist_y;
1224 shortest_dist_to_flash_index_y=i_flash;
1227 double dist_yz=DBL_MAX;
1228 dist_yz=std::sqrt(dist_y*dist_y+dist_z*dist_z);
1229 if(dist_yz<shortest_dist_to_flash_yz){
1230 shortest_dist_to_flash_yz = dist_yz;
1231 shortest_dist_to_flash_index_yz=i_flash;
1257 int pfp_size = all_PPFPs.size();
1258 for(
int index = 0; index < pfp_size; index++){
1261 if( (pfp->Daughters().front()) == all_PPFPs[index].pPFParticle->Self()){
std::vector< double > m_reco_shower_dEdx_plane1_max
void AnalyzeTrackCalo(const std::vector< art::Ptr< recob::Track >> &tracks, std::vector< PandoraPFParticle > all_PPFPs, var_all &vars, para_all ¶s)
std::vector< double > m_reco_shower_dEdx_plane2_min
std::vector< int > m_reco_shower_flash_shortest_index_yz
std::vector< double > m_reco_flash_zcenter
std::vector< double > m_reco_track_spacepoint_chi
std::vector< double > CalcdEdxFromdQdx(std::vector< double > dqdx, para_all ¶s)
std::vector< int > m_reco_shower_hit_plane
const bool get_IsNuSlice() const
std::vector< double > m_reco_track_spacepoint_principal2
std::vector< int > m_reco_track_pfparticle_pdg
void setRadius(const double &rad)
Set the smearing radius over which to take hits for truncated mean computaton.
std::vector< double > m_reco_track_mean_dEdx_best_plane
std::vector< double > m_reco_track_spacepoint_principal0
std::vector< double > m_reco_shower_nuscore
std::vector< double > m_reco_track_pid_bragg_likelihood_mu_plane0
std::vector< double > m_reco_track_mean_trunc_dEdx_start_half_p1
std::vector< double > m_reco_shower_theta_yz
std::vector< std::vector< double > > m_reco_track_trunc_dEdx_p0
const int get_PFParticleID() const
std::vector< int > m_reco_shower_num_hits_plane2
std::vector< bool > m_reco_shower_isclearcosmic
std::vector< double > m_reco_track_pid_chi2_mu_plane0
std::vector< double > m_reco_shower_plane0_nhits
double m_CRT_min_hit_time
std::vector< int > m_reco_shower_delaunay_num_triangles_plane0
double s_beamgate_flash_start
ClusterModuleLabel join with tracks
int getNHitsPlane(std::vector< art::Ptr< recob::Hit >> hits, int this_plane)
std::vector< double > m_reco_track_calo_energy_max
std::vector< double > m_reco_shower_startz
std::vector< art::Ptr< recob::Cluster > > pClusters
std::vector< double > m_reco_flash_total_pe_in_beamgate
IteratorBox< plane_iterator,&GeometryCore::begin_plane,&GeometryCore::end_plane > IteratePlanes() const
Enables ranged-for loops on all planes of the detector.
process_name opflash particleana ie x
std::vector< double > m_reco_track_pid_bragg_likelihood_mu_plane2
std::vector< double > m_reco_track_mean_trunc_dEdx_best_plane
void CalcTruncMeanProfile(const std::vector< double > &rr_v, const std::vector< double > &dq_v, std::vector< double > &dq_trunc_v, const double &nsigma=1)
Given residual range and dq vectors return truncated local dq. Input vectors are assumed to be match ...
std::vector< double > m_reco_track_pid_chi2_p_plane2
int getAmalgamateddEdxNHits(double amalgamateddEdx, double median_plane0, double median_plane1, double median_plane2, int plane0_nhits, int plane1_nhits, int plane2_nhits)
std::vector< double > m_reco_shower_plane1_nhits
double s_track_calo_min_dEdx
std::vector< double > m_reco_track_end_dist_to_SCB
std::vector< double > m_reco_shower_dEdx_plane2_nhits
std::vector< double > m_reco_shower3d_implied_dirz
std::vector< std::vector< double > > m_reco_track_dEdx_p1
std::vector< double > m_reco_shower_impact_parameter
std::vector< double > m_reco_shower_dEdx_plane1_min
std::vector< double > m_reco_track_trunc_PIDA_p0
std::vector< double > m_reco_track_pid_bragg_likelihood_p_plane2
const bool get_HasPID() const
std::vector< double > m_reco_track_daughter_trackscore
std::vector< double > m_reco_shower_dEdx_plane1_nhits
std::vector< double > m_reco_track_mean_trunc_dEdx_end_half_p0
std::vector< int > m_reco_track_good_calo_p0
std::vector< double > m_reco_track_startx
std::vector< double > m_reco_shower_dEdx_plane0_nhits
std::vector< std::vector< double > > m_reco_shower_dEdx_plane0
std::vector< int > m_reco_shower_delaunay_num_triangles_plane2
std::vector< int > m_reco_track_good_calo_p1
std::vector< int > m_reco_shower_flash_shortest_index_y
std::vector< double > m_reco_shower_dQdx_plane0_median
std::vector< double > m_reco_shower3d_energy_plane1
std::vector< double > m_reco_shower_implied_dirx
std::vector< double > m_reco_shower_flash_shortest_disty
std::vector< double > m_reco_track_pid_chi2_p_plane1
std::vector< int > m_reco_shower_num_daughters
std::vector< double > m_reco_track_theta_yz
double s_track_calo_trunc_fraction
std::vector< double > m_CRT_hits_y
std::vector< double > m_reco_track_mean_trunc_dEdx_end_half_best_plane
std::vector< std::vector< double > > m_reco_shower_dQdx_plane1
std::vector< double > m_reco_track_end_dist_to_active_TPC
art::Ptr< recob::PFParticle > pPFParticle
std::vector< int > m_reco_track_best_calo_plane
std::vector< size_t > sort_indexes(const std::vector< T > &v)
std::vector< double > m_reco_track_phi_yx
std::vector< int > m_reco_track_num_calo_hits_p2
std::vector< double > m_reco_track_pid_chi2_mu_plane2
const std::vector< art::Ptr< anab::Calorimetry > > get_Calorimetries() const
std::vector< double > m_reco_shower_dEdx_plane2_median
std::vector< std::vector< double > > m_reco_track_dEdx_p2
std::vector< int > m_reco_track_num_daughters
std::vector< double > m_reco_shower3d_startz
std::vector< double > m_reco_track_trunc_PIDA_best_plane
std::vector< double > m_reco_shower3d_dEdx_plane2
process_name use argoneut_mc_hitfinder track
std::vector< int > m_reco_shower_delaunay_num_triangles_plane1
std::vector< std::vector< double > > m_reco_track_dEdx_best_plane
int delaunay_hit_wrapper(const std::vector< art::Ptr< recob::Hit >> &hits, std::vector< int > &num_hits, std::vector< int > &num_triangles, std::vector< double > &area, para_all ¶s)
std::vector< double > m_reco_shower_dQdx_plane2_median
std::vector< double > m_reco_track_mean_dEdx_p0
std::vector< double > m_reco_track_diry
float fValue
Result of Particle ID algorithm/test.
std::vector< std::vector< double > > m_reco_track_resrange_p1
std::vector< double > m_reco_shower3d_phi_yx
double dist_line_point(std::vector< double > &X1, std::vector< double > &X2, std::vector< double > &point)
std::vector< double > m_reco_shower3d_energy_plane0
std::vector< double > m_reco_flash_time
std::vector< std::vector< double > > m_reco_track_resrange_p0
std::vector< bool > m_reco_shower_is_nuslice
std::vector< double > m_reco_track_pid_bragg_likelihood_mip_plane0
std::vector< double > m_reco_track_mean_dEdx_start_half_p0
std::vector< double > m_reco_track_pid_chi2_p_plane0
std::vector< double > m_reco_track_mean_dEdx_end_half_p1
const art::Ptr< anab::ParticleID > get_ParticleID() const
const int get_PdgCode() const
std::vector< double > m_reco_track_dirz
std::vector< double > m_reco_shower_delaunay_area_plane2
double s_beamgate_flash_end
std::vector< double > m_reco_track_mean_dEdx_end_half_best_plane
std::vector< int > m_reco_flash_frame
std::vector< double > m_reco_shower_startx
std::vector< double > m_reco_track_starty
std::bitset< 8 > fPlaneMask
Bitset for PlaneID used by algorithm, allowing for multiple planes and up to 8 total planes...
std::vector< double > m_reco_shower_energy_plane2
std::vector< int > m_reco_track_start_in_SCB
std::vector< double > m_reco_track_spacepoint_principal1
std::vector< double > m_reco_shower_dirz
std::vector< art::Ptr< recob::Hit > > pPFPHits
std::string fAlgName
< determined particle ID
std::vector< double > m_reco_track_proton_kinetic_energy
std::vector< double > m_reco_shower_implied_diry
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::vector< double > m_reco_track_mean_dEdx_end_half_p0
kVariableType fVariableType
Variable type enum: defined in ParticleID_VariableTypeEnums.h. Set to kNotSet by default.
std::vector< double > m_reco_shower_flash_shortest_distyz
std::vector< int > m_reco_shower_start_in_SCB
std::vector< double > m_reco_track_mean_trunc_dEdx_start_half_p2
std::vector< bool > m_reco_track_is_nuslice
std::vector< size_t > m_reco_track_ordered_energy_index
std::vector< double > m_reco_flash_time_in_beamgate
std::vector< double > m_reco_track_spacepoint_max_dist
std::vector< double > m_reco_track_pid_bragg_likelihood_p_plane1
double s_track_calo_min_dEdx_hits
std::vector< double > m_reco_shower3d_theta_yz
std::vector< double > m_reco_track_start_dist_to_CPA
std::vector< double > m_reco_flash_time_width
std::vector< int > Printer_header(std::vector< std::string > headings)
std::vector< double > m_reco_shower_angle_wrt_wires_plane1
std::vector< int > m_reco_track_sliceId
std::vector< double > m_reco_track_calo_energy_plane2
std::vector< double > m_reco_shower_energy_max
std::vector< double > m_reco_shower_plane2_nhits
std::vector< double > m_reco_track_mean_dEdx_p1
std::vector< double > m_reco_shower3d_length
std::vector< double > m_reco_track_nuscore
std::vector< double > m_reco_shower_dEdx_plane0_max
std::vector< double > m_reco_shower_dEdx_amalgamated
std::vector< double > m_CRT_hits_x
std::vector< double > m_reco_shower_length
std::vector< double > m_reco_track_calo_energy_plane1
std::vector< double > m_reco_shower_delaunay_area_plane1
double getMeanHitWidthPlane(std::vector< art::Ptr< recob::Hit >> hits, int this_plane)
std::vector< int > m_reco_shower_num_hits_plane1
std::vector< double > m_reco_shower_plane2_meanRMS
std::vector< double > m_reco_track_trunc_PIDA_p1
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
const double get_TrackScore() const
std::vector< double > m_reco_shower_dEdx_plane1_mean
std::vector< double > m_reco_track_mean_trunc_dEdx_p1
std::vector< double > m_reco_shower_flash_shortest_distz
std::vector< double > m_reco_shower3d_dEdx_plane0
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
geo::GeometryCore const * s_geom
std::vector< int > m_reco_track_good_calo_best_plane
std::vector< double > m_reco_track_mean_dEdx_p2
std::vector< double > m_CRT_veto_hit_PE
std::vector< double > m_reco_shower_dEdx_plane2_max
std::vector< int > m_reco_shower_flash_shortest_index_z
std::vector< int > m_reco_track_end_in_SCB
std::vector< double > m_reco_shower_daughter_trackscore
std::vector< double > m_reco_shower3d_implied_dirx
std::vector< double > m_reco_shower_implied_dirz
std::vector< std::vector< double > > m_reco_shower_dEdx_plane2
std::vector< double > m_reco_shower_energy_plane1
std::vector< double > m_reco_shower_dEdx_plane0_mean
std::vector< double > m_reco_shower3d_implied_diry
std::vector< double > m_reco_shower_starty
std::vector< double > m_reco_track_dirx
int distToSCB(double &dist, std::vector< double > &vec, para_all ¶s)
std::vector< int > m_reco_shower_dEdx_amalgamated_nhits
std::vector< int > m_reco_shower_sliceId
std::vector< double > m_reco_shower3d_openingangle
std::vector< std::vector< double > > m_reco_shower_dQdx_plane0
double distToCPA(std::vector< double > &vec, para_all ¶s)
std::vector< double > m_reco_shower_plane1_meanRMS
std::vector< double > m_reco_track_mean_dEdx_start_half_best_plane
std::vector< double > m_reco_track_pid_three_plane_proton_pid
std::vector< double > m_reco_flash_ycenter_in_beamgate
std::vector< double > m_reco_track_mean_trunc_dEdx_p2
PandoraPFParticle * PPFP_GetPPFPFromTrack(std::vector< PandoraPFParticle > &PPFPs, art::Ptr< recob::Track > pTrack)
std::vector< double > m_reco_track_mean_trunc_dEdx_end_half_p2
void AnalyzeTracks(std::vector< PandoraPFParticle > all_PPFPs, const std::vector< art::Ptr< recob::Track >> &tracks, std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::SpacePoint >>> &pfParticleToSpacePointsMap, std::map< int, art::Ptr< simb::MCParticle > > &MCParticleToTrackIdMap, std::map< int, double > &sliceIdToNuScoreMap, var_all &vars, para_all ¶s)
std::vector< double > m_reco_shower_start_dist_to_active_TPC
std::vector< double > m_reco_track_endz
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
std::vector< double > CalcdQdxShower(const art::Ptr< recob::Shower > &shower, const std::vector< art::Ptr< recob::Cluster >> &clusters, std::map< art::Ptr< recob::Cluster >, std::vector< art::Ptr< recob::Hit >> > &clusterToHitMap, int plane, double triggeroffset, detinfo::DetectorPropertiesData const &theDetector, para_all ¶s)
std::vector< std::vector< double > > m_reco_shower_dQdx_plane2
std::vector< double > m_reco_flash_ywidth
std::vector< double > m_reco_track_trackscore
auto norm(Vector const &v)
Return norm of the specified vector.
std::vector< double > m_reco_track_endx
std::vector< double > m_reco_shower_openingangle
std::vector< double > m_reco_flash_ycenter
std::vector< double > m_CRT_hits_PE
std::vector< double > m_reco_shower_phi_yx
const int get_SliceID() const
std::vector< size_t > m_reco_shower_ordered_energy_index
std::vector< double > m_reco_shower_dEdx_plane2_mean
std::vector< double > m_reco_track_start_dist_to_active_TPC
std::vector< int > m_reco_track_num_trajpoints
std::vector< double > m_reco_track_pid_bragg_likelihood_mip_plane1
std::vector< double > m_reco_shower_dEdx_plane0_min
double CalcEShowerPlane(const std::vector< art::Ptr< recob::Hit >> &hits, int this_plane, para_all ¶s)
std::vector< double > m_reco_track_mean_trunc_dEdx_start_half_best_plane
std::vector< double > m_reco_shower3d_dEdx_plane1
std::vector< double > m_reco_track_pid_chi2_mu_plane1
std::vector< double > m_reco_shower_energy_plane0
std::vector< int > m_reco_track_num_calo_hits_p0
std::vector< double > m_CRT_hits_z
std::vector< double > m_reco_shower3d_diry
std::vector< double > m_reco_flash_zwidth
std::vector< double > m_reco_shower_delaunay_area_plane0
std::vector< int > m_reco_track_good_calo_p2
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)
std::vector< bool > m_reco_track_isclearcosmic
std::vector< double > m_reco_track_pid_pida_plane1
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
std::vector< double > m_reco_flash_total_pe
void Printer_content(std::vector< std::string > nums, std::vector< int > spacers)
std::vector< double > m_reco_shower3d_dirz
std::vector< std::vector< double > > m_reco_track_trunc_dEdx_p2
std::vector< double > m_reco_flash_zcenter_in_beamgate
std::vector< int > m_reco_shower_hit_wire
std::string to_string(WindowPattern const &pattern)
std::vector< double > m_reco_track_trunc_PIDA_p2
std::vector< std::vector< double > > m_reco_track_dEdx_p0
std::vector< double > m_reco_track_start_dist_to_SCB
PandoraPFParticle * PPFP_GetPPFPFromShower(std::vector< PandoraPFParticle > &PPFPs, art::Ptr< recob::Shower > pShower)
std::vector< std::vector< double > > m_reco_track_trunc_dEdx_p1
std::vector< double > m_reco_shower_dQdx_plane1_median
std::vector< double > m_reco_shower_angle_wrt_wires_plane2
std::vector< double > m_reco_shower3d_impact_parameter
const double get_NuScore() const
std::vector< double > m_reco_flash_abs_time
std::vector< double > m_reco_shower3d_conversion_distance
std::vector< double > m_reco_shower_start_dist_to_SCB
std::vector< int > m_reco_shower3d_exists
std::vector< double > m_reco_track_mean_trunc_dEdx_end_half_p1
std::vector< double > m_reco_track_mean_dEdx_start_half_p1
std::vector< double > m_reco_shower3d_dirx
std::vector< double > m_reco_shower_trackscore
std::vector< double > m_reco_track_mean_dEdx_start_half_p2
std::vector< int > m_reco_track_num_calo_hits_p1
std::vector< double > m_reco_shower_angle_wrt_wires_plane0
std::vector< double > m_reco_track_endy
const bool get_IsClearCosmic() const
std::vector< double > m_reco_shower3d_starty
std::vector< double > m_reco_shower_hit_tick
std::vector< double > m_reco_track_startz
std::vector< double > m_reco_shower_pfparticle_pdg
void CollectPID(std::vector< art::Ptr< recob::Track >> &tracks, std::vector< PandoraPFParticle > all_PPFPs, var_all &vars)
double getMedian(std::vector< double > thisvector)
std::vector< int > m_reco_track_num_spacepoints
std::vector< double > m_reco_track_end_dist_to_CPA
double distToTPCActive(std::vector< double > &vec, para_all ¶s)
void AnalyzeShowers(std::vector< PandoraPFParticle > all_PPFPs, const std::vector< art::Ptr< recob::Shower >> &showers, std::map< art::Ptr< recob::Cluster >, std::vector< art::Ptr< recob::Hit >> > &clusterToHitMap, double triggeroffset, detinfo::DetectorPropertiesData const &theDetector, var_all &vars, para_all ¶s)
std::vector< double > m_CRT_hits_time
std::vector< double > m_reco_shower3d_energy_plane2
int m_reco_num_flashes_in_beamgate
std::vector< std::vector< double > > m_reco_track_resrange_p2
std::vector< double > m_reco_shower_diry
std::vector< double > m_reco_track_pid_bragg_likelihood_mu_plane1
std::vector< double > m_reco_shower_start_dist_to_CPA
std::vector< double > m_reco_track_mean_trunc_dEdx_start_half_p0
std::vector< double > m_reco_shower_dEdx_plane0_median
std::vector< double > m_reco_shower_conversion_distance
std::vector< size_t > m_reco_track_ordered_displacement_index
double WireAngleToVertical(geo::View_t view, geo::TPCID const &tpcid) const
Returns the angle of the wires in the specified view from vertical.
void AnalyzeFlashes(const std::vector< art::Ptr< recob::OpFlash >> &flashes, art::Handle< std::vector< sbn::crt::CRTHit >> crthit_h, double evt_timeGPS_nsec, std::map< art::Ptr< recob::OpFlash >, std::vector< art::Ptr< sbn::crt::CRTHit >>> crtvetoToFlashMap, var_all &vars, para_all ¶s)
BEGIN_PROLOG could also be cout
std::vector< double > m_reco_track_mean_dEdx_end_half_p2
std::vector< std::vector< double > > m_reco_track_trunc_dEdx_best_plane
std::vector< double > m_reco_shower_dirx
std::vector< double > m_reco_track_pid_pida_plane0
std::vector< double > m_reco_track_pid_pida_plane2
std::vector< double > m_reco_track_mean_trunc_dEdx_p0
std::vector< int > m_reco_shower_num_hits_plane0
int fAssumedPdg
PDG of particle hypothesis assumed by algorithm, if applicable. Set to 0 by default.
std::vector< double > m_reco_track_calo_energy_plane0
std::vector< double > m_reco_shower3d_startx
std::vector< double > m_reco_track_length
std::vector< double > m_reco_shower_plane0_meanRMS
std::vector< double > m_reco_shower_dEdx_plane1_median
std::vector< double > m_reco_track_pid_bragg_likelihood_p_plane0
std::vector< std::vector< double > > m_reco_track_resrange_best_plane
std::vector< std::vector< double > > m_reco_shower_dEdx_plane1
double s_track_calo_max_dEdx
std::vector< double > m_reco_track_pid_bragg_likelihood_mip_plane2