67 art::Handle< std::vector<recob::Track> > trackListHandle;
68 std::vector<art::Ptr<recob::Track> > tracklist;
70 art::fill_ptr_vector(tracklist, trackListHandle);
73 std::vector<art::FindManyP<anab::Calorimetry>> calos;
75 calos.emplace_back(tracklist,
evt, l);
80 for (
unsigned trk_i = 0; trk_i < tracklist.size(); trk_i++) {
81 std::vector<art::Ptr<anab::Calorimetry>> base = calos[0].at(trk_i);
84 std::cout <<
"Base calo (" << fCaloLabels[0] <<
") n calo: " << base.size() << std::endl;
85 for (
unsigned plane = 0; plane < base.size(); plane++) {
86 std::cout <<
"N points on plane (" << plane <<
") ID (" << base[plane]->PlaneID() <<
") n points: " << base[plane]->dEdx().size() << std::endl;
89 for (
unsigned i = 1; i < fCaloLabels.size(); i++) {
91 std::vector<art::Ptr<anab::Calorimetry>> othr = calos[i].at(trk_i);
92 if (base.size() != othr.size()) {
94 std::cout <<
"Track: " << trk_i <<
" calo (" << fCaloLabels[0] <<
") has (" << base.size() <<
"). Calo (" << fCaloLabels[i] <<
") has size (" << othr.size() <<
") mismatch." << std::endl;
97 for (
unsigned plane = 0; plane < base.size(); plane++) {
99 if (base[plane]->
PlaneID() != othr[plane]->PlaneID()) {
101 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
102 std::cout <<
"Plane ID mismatch (" << base[plane]->PlaneID() <<
") (" << othr[plane]->PlaneID() <<
")" << std::endl;
106 if (
abs(base[plane]->Range() - othr[plane]->Range()) > EPS) {
108 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
109 std::cout <<
"Range mismatch (" << base[plane]->Range() <<
") (" << othr[plane]->Range() <<
")" << std::endl;
113 if (
abs(base[plane]->KineticEnergy() - othr[plane]->KineticEnergy()) > EPS) {
115 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
116 std::cout <<
"KineticEnergy mismatch (" << base[plane]->KineticEnergy() <<
") (" << othr[plane]->KineticEnergy() <<
")" << std::endl;
120 const std::vector<float> &base_dedx = base[plane]->dEdx();
121 const std::vector<float> &othr_dedx = othr[plane]->dEdx();
123 if (base_dedx.size() == othr_dedx.size()) {
124 for (
unsigned i_dedx = 0; i_dedx < base_dedx.size(); i_dedx++) {
125 if (
abs(base_dedx[i_dedx] - othr_dedx[i_dedx]) > EPS) {
127 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
128 std::cout <<
"dEdx mismatch at index: " << i_dedx <<
" (" << base_dedx[i_dedx] <<
") (" << othr_dedx[i_dedx] <<
")" << std::endl;
134 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"dEdx size mismatch (" << base_dedx.size() <<
") (" << othr_dedx.size() <<
")" << std::endl;
138 const std::vector<float> &base_dqdx = base[plane]->dQdx();
139 const std::vector<float> &othr_dqdx = othr[plane]->dQdx();
141 if (base_dqdx.size() == othr_dqdx.size()) {
142 for (
unsigned i_dqdx = 0; i_dqdx < base_dqdx.size(); i_dqdx++) {
143 if (
abs(base_dqdx[i_dqdx] - othr_dqdx[i_dqdx]) > EPS) {
145 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
146 std::cout <<
"dQdx mismatch at index: " << i_dqdx <<
" (" << base_dqdx[i_dqdx] <<
") (" << othr_dqdx[i_dqdx] <<
")" << std::endl;
152 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"dQdx size mismatch (" << base_dqdx.size() <<
") (" << othr_dqdx.size() <<
")" << std::endl;
156 const std::vector<float> &base_rr = base[plane]->ResidualRange();
157 const std::vector<float> &othr_rr = othr[plane]->ResidualRange();
159 if (base_rr.size() == othr_rr.size()) {
160 for (
unsigned i_rr = 0; i_rr < base_rr.size(); i_rr++) {
161 if (
abs(base_rr[i_rr] - othr_rr[i_rr]) > EPS) {
163 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
164 std::cout <<
"ResidualRange mismatch at index: " << i_rr <<
" (" << base_rr[i_rr] <<
") (" << othr_rr[i_rr] <<
")" << std::endl;
170 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"ResidualRange size mismatch (" << base_rr.size() <<
") (" << othr_rr.size() <<
")" << std::endl;
174 const std::vector<float> &base_dwrr = base[plane]->DeadWireResRC();
175 const std::vector<float> &othr_dwrr = othr[plane]->DeadWireResRC();
177 if (base_dwrr.size() == othr_dwrr.size()) {
178 for (
unsigned i_dwrr = 0; i_dwrr < base_dwrr.size(); i_dwrr++) {
179 if (
abs(base_dwrr[i_dwrr] - othr_dwrr[i_dwrr]) > EPS) {
181 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
182 std::cout <<
"DeadWireResRC mismatch at index: " << i_dwrr <<
" (" << base_dwrr[i_dwrr] <<
") (" << othr_dwrr[i_dwrr] <<
")" << std::endl;
188 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"DeadWireResRC size mismatch (" << base_dwrr.size() <<
") (" << othr_dwrr.size() <<
")" << std::endl;
192 const std::vector<float> &base_tpv = base[plane]->TrkPitchVec();
193 const std::vector<float> &othr_tpv = othr[plane]->TrkPitchVec();
195 if (base_tpv.size() == othr_tpv.size()) {
196 for (
unsigned i_tpv = 0; i_tpv < base_tpv.size(); i_tpv++) {
197 if (
abs(base_tpv[i_tpv] - othr_tpv[i_tpv]) > EPS) {
199 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
200 std::cout <<
"TrkPitchVec mismatch at index: " << i_tpv <<
" (" << base_tpv[i_tpv] <<
") (" << othr_tpv[i_tpv] <<
")" << std::endl;
206 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"TrkPitchVec size mismatch (" << base_tpv.size() <<
") (" << othr_tpv.size() <<
")" << std::endl;
210 const std::vector<size_t> &base_tpi = base[plane]->TpIndices();
211 const std::vector<size_t> &othr_tpi = othr[plane]->TpIndices();
213 if (base_tpi.size() == othr_tpi.size()) {
214 for (
unsigned i_tpi = 0; i_tpi < base_tpi.size(); i_tpi++) {
215 if (base_tpi[i_tpi] != othr_tpi[i_tpi]) {
217 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
218 std::cout <<
"TpIndices mismatch at index: " << i_tpi <<
" (" << base_tpi[i_tpi] <<
") (" << othr_tpi[i_tpi] <<
")" << std::endl;
224 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"TpIndices size mismatch (" << base_tpi.size() <<
") (" << othr_tpi.size() <<
")" << std::endl;
228 const std::vector<geo::Point_t> &base_xyz = base[plane]->XYZ();
229 const std::vector<geo::Point_t> &othr_xyz = othr[plane]->XYZ();
231 if (base_xyz.size() == othr_xyz.size()) {
232 for (
unsigned i_xyz = 0; i_xyz < base_xyz.size(); i_xyz++) {
233 if (
abs(base_xyz[i_xyz].
X() - othr_xyz[i_xyz].
X()) > EPS ||
234 abs(base_xyz[i_xyz].Y() - othr_xyz[i_xyz].Y()) > EPS ||
235 abs(base_xyz[i_xyz].Z() - othr_xyz[i_xyz].Z()) > EPS) {
237 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": ";
238 std::cout <<
"XYZ mismatch at index: " << i_xyz;
239 std::cout <<
"X (" << base_xyz[i_xyz].X() <<
") (" << othr_xyz[i_xyz].X() <<
") ";
240 std::cout <<
"Y (" << base_xyz[i_xyz].Y() <<
") (" << othr_xyz[i_xyz].Y() <<
") ";
241 std::cout <<
"Z (" << base_xyz[i_xyz].Z() <<
") (" << othr_xyz[i_xyz].Z() <<
") " << std::endl;
247 std::cout <<
"Track: " << trk_i <<
" calos (" << fCaloLabels[0] <<
") (" << fCaloLabels[i] <<
") plane " << plane <<
": " <<
"XYZ size mismatch (" << base_xyz.size() <<
") (" << othr_xyz.size() <<
")" << std::endl;
253 std::cout <<
"Track: " << trk_i <<
" calo (" << fCaloLabels[0] <<
") is equal to calo (" << fCaloLabels[i] <<
")" << std::endl;
then echo echo For and will not be changed by echo further linking echo echo B echo The symbol is in the uninitialized data multiple common symbols may appear with the echo same name If the symbol is defined the common echo symbols are treated as undefined references For more echo details on common see the discussion of warn common echo in *Note Linker see the discussion of warn common echo in *Note Linker such as a global int variable echo as opposed to a large global array echo echo I echo The symbol is an indirect reference to another symbol This echo is a GNU extension to the a out object file format which is echo rarely used echo echo N echo The symbol is a debugging symbol echo echo R echo The symbol is in a read only data section echo echo S echo The symbol is in an uninitialized data section for small echo objects echo echo T echo The symbol is in the the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo W echo The symbol is a weak symbol that has not been specifically echo tagged as a weak object symbol When a weak defined symbol echo is linked with a normal defined the normal defined echo symbol is used with no error When a weak undefined symbol echo is linked and the symbol is not the value of the echo weak symbol becomes zero with no error echo echo echo The symbol is a stabs symbol in an a out object file In echo this the next values printed are the stabs other echo the stabs desc and the stab type Stabs symbols are echo used to hold debugging information For more echo see *Note or object file format specific echo echo For Mac OS X
IDparameter< geo::PlaneID > PlaneID
Member type of validated geo::PlaneID parameter.
std::vector< std::string > fCaloLabels
bool equal(double a, double b)
Comparison tolerance, in centimeters.
BEGIN_PROLOG could also be cout