NueSkimmer.cxx
Go to the documentation of this file.
1 //
2 // NueSkimmer.cpp
3 // nova-mrb
4 //
5 // Created by Brian Rebel on 2/18/16.
6 // Copyright © 2016 Brian Rebel. All rights reserved.
7 //
8 
16 
17 #include <memory>
18 #include <map>
19 
20 #include "RecoBase/Prong.h"
21 #include "RecoBase/Track.h"
22 #include "RecoBase/Vertex.h"
23 #include "LEM/PIDDetails.h"
24 #include "ShowerLID/EventLID.h"
25 #include "CosRej/NueCosRej.h"
26 #include "CVN/func/Result.h"
27 #include "MEFinder/MEClusters.h"
28 #include "Preselection/Veto.h"
29 #include "Preselection/PreselObj.h"
30 #include "NueSandbox/NueSandObj.h"
31 #include "Utilities/AssociationUtil.h"
34 
38 
39 
40 //------------------------------------------------------------------------------
42 {
43  return s1->CalorimetricEnergy() > s2->CalorimetricEnergy();
44 }
45 
46 //------------------------------------------------------------------------------
48 {
49  return p1->TotalLength() > p2->TotalLength();
50 }
51 
52 
53 //------------------------------------------------------------------------------
56 
57 {
58  this->reconfigure(p);
59 
60  return;
61 }
62 
63 //------------------------------------------------------------------------------
65  art::EDProducer const& prod)
66 {
67  // get the CellHits made in the previous module
69  e.getByLabel(fInputTag, cellHits);
70 
71  if(cellHits.failedToGet() ){
72  LOG_VERBATIM("NueSkimmer")
73  << "There are no numu CellHits for this event, don't try to skim anything.";
74  return;
75  }
76 
77  // if we are in this module, then this event has interesting slices.
78  // to facilitate making copies of the rb::XXX objects we want, make
79  // a map of the cell unique id values to the art::Ptr of the copy
80  // from the previous module
81  skim::SkimmingUtils su(cellHits, fInstanceLabel);
82 
83  // get the slices out of the event
85  e.getByLabel(fInputTag, sliceHandle);
86 
87  art::Handle<std::vector<int> > sliceNumHandle;
88  e.getByLabel(fInputTag, sliceNumHandle);
89 
90  auto slices = *sliceHandle;
91 
92  LOG_DEBUG("NueSkimmer")
93  << "there are "
94  << slices.size()
95  << " slices in this event"
96  << sliceNumHandle->size();
97 
98  // get the FindMany for the slices to XXX association.
100  art::FindManyP<rb::Shower> fms (slices, e, fShowerLabel);
101  art::FindManyP<rb::Prong> fmp (slices, e, fProngTag);
102  art::FindManyP<rb::Vertex> fmv (slices, e, fVertexLabel);
103  art::FindManyP<slid::EventLID> fmelid (slices, e, fLIDLabel);
104  art::FindManyP<lem::PIDDetails> fmlem (slices, e, fLEMLabel);
105  art::FindManyP<cvn::Result> fmcvn (slices, e, fCVNLabel);
106  art::FindManyP<presel::Veto> fmnueveto(slices, e, fNueVetoLabel);
107  art::FindManyP<me::SlcME> fmslcme (slices, e, fMichelLabel);
108  art::FindManyP<me::TrkME> fmtrkme (slices, e, fMichelLabel);
109 
110  // need to copy the following objects into the new file still
111  // presel::PreselObj --> simple data types, associated to slice
112  // presel::Veto --> simple data types, associated to slice
113  // nuesand::NueSandObj --> simple data types, associated to slice
114 
115  // now we are sure we have all the data products we need, declare the items to store in the event
116  // As long as we do a drop on output we will keep all the necessary provanence information on how
117  // each item was created. The information is left in the configuration DB intact, and we know what
118  // modules created which input data product by the module label configurations for this module.
119  std::unique_ptr< std::vector<rb::Cluster> > sliceOut (new std::vector<rb::Cluster> );
120  std::unique_ptr< std::vector<rb::Shower> > showerOut (new std::vector<rb::Shower> );
121  std::unique_ptr< std::vector<rb::Prong> > prongOut (new std::vector<rb::Prong> );
122  std::unique_ptr< std::vector<rb::Vertex> > vertexOut (new std::vector<rb::Vertex> );
123  std::unique_ptr< std::vector<slid::EventLID> > elidOut (new std::vector<slid::EventLID> );
124  std::unique_ptr< std::vector<slid::ShowerLID> > slidOut (new std::vector<slid::ShowerLID> );
125  std::unique_ptr< std::vector<lem::PIDDetails> > lemOut (new std::vector<lem::PIDDetails> );
126  std::unique_ptr< std::vector<cosrej::NueCosRej> > cosrejOut (new std::vector<cosrej::NueCosRej> );
127  std::unique_ptr< std::vector<cvn::Result> > cvnOut (new std::vector<cvn::Result> );
128  std::unique_ptr< std::vector<presel::Veto> > nuevetoOut (new std::vector<presel::Veto> );
129  std::unique_ptr< std::vector<me::SlcME> > slcmeOut (new std::vector<me::SlcME> );
130  std::unique_ptr< std::vector<me::TrkME> > trkmeOut (new std::vector<me::TrkME> );
131  std::unique_ptr< std::vector<rb::PID> > pidOut (new std::vector<rb::PID> ); // 2017
132  std::unique_ptr< art::Assns<rb::Cluster, rb::Shower> > slcShwAssn (new art::Assns<rb::Cluster, rb::Shower> );
133  std::unique_ptr< art::Assns<rb::Cluster, rb::Prong> > slcPrgAssn (new art::Assns<rb::Cluster, rb::Prong> );
134  std::unique_ptr< art::Assns<rb::Cluster, rb::Vertex> > slcVtxAssn (new art::Assns<rb::Cluster, rb::Vertex> );
135  std::unique_ptr< art::Assns<rb::Cluster, slid::EventLID> > slcELDAssn (new art::Assns<rb::Cluster, slid::EventLID> );
136  std::unique_ptr< art::Assns<rb::Cluster, slid::ShowerLID> > slcSLDAssn (new art::Assns<rb::Cluster, slid::ShowerLID> );
137  std::unique_ptr< art::Assns<rb::Shower, slid::ShowerLID> > shwSLDAssn (new art::Assns<rb::Shower, slid::ShowerLID> );
138  std::unique_ptr< art::Assns<rb::Cluster, lem::PIDDetails> > slcLEMAssn (new art::Assns<rb::Cluster, lem::PIDDetails> );
139  std::unique_ptr< art::Assns<rb::Cluster, cosrej::NueCosRej> > slcCRJAssn (new art::Assns<rb::Cluster, cosrej::NueCosRej> );
140  std::unique_ptr< art::Assns<rb::Cluster, simb::MCTruth> > slcTruAssn (new art::Assns<rb::Cluster, simb::MCTruth> );
141  std::unique_ptr< art::Assns<rb::Cluster, simb::MCFlux> > slcFlxAssn (new art::Assns<rb::Cluster, simb::MCFlux> );
142  std::unique_ptr< art::Assns<rb::Cluster, fxwgt::FluxWeights> > slcFlxWgtAssn (new art::Assns<rb::Cluster, fxwgt::FluxWeights> );
143  std::unique_ptr< art::Assns<rb::Cluster, simb::GTruth> > slcGTruAssn (new art::Assns<rb::Cluster, simb::GTruth> );
144  std::unique_ptr< art::Assns<rb::Cluster, cvn::Result> > slcCVNAssn (new art::Assns<rb::Cluster, cvn::Result> );
145  std::unique_ptr< art::Assns<rb::Cluster, presel::Veto> > slcNueVetoAssn(new art::Assns<rb::Cluster, presel::Veto> );
146  std::unique_ptr< art::Assns<rb::Cluster, me::SlcME> > slcSlcMEAssn (new art::Assns<rb::Cluster, me::SlcME> );
147  std::unique_ptr< art::Assns<rb::Cluster, me::TrkME> > slcTrkMEAssn (new art::Assns<rb::Cluster, me::TrkME> );
148  std::unique_ptr< art::Assns<rb::Cluster, rb::PID> > slcPIDAssn(new art::Assns<rb::Cluster, rb::PID> ); // 2017
149  std::unique_ptr< art::Assns<rb::Prong, rb::PID> > pngPIDAssn(new art::Assns<rb::Prong, rb::PID> ); // 2017
150  std::unique_ptr< art::Assns< rb::Shower, rb::Prong > > shwPngAssn( new art::Assns< rb::Shower, rb::Prong> ); // 2017
151 
152  size_t sliceNum = 0;
153 
154  for(size_t s = 0; s < slices.size(); ++s){
155 
156  sliceNum = sliceNumHandle->at(s);
157 
158  // vector of art::Ptrs for the FindManyP calls
159  std::vector< art::Ptr<rb::Shower> > showers;
160  std::vector< art::Ptr<rb::Prong> > prongs;
161  std::vector< art::Ptr<rb::Vertex> > vertices;
162  std::vector< art::Ptr<slid::EventLID> > eLIDs;
163  std::vector< art::Ptr<lem::PIDDetails> > lems;
164  std::vector< art::Ptr<cosrej::NueCosRej> > cosrejs;
165  std::vector< art::Ptr<cvn::Result> > cvns;
166  std::vector< art::Ptr<presel::Veto> > nuevetos;
167  std::vector< art::Ptr<me::SlcME> > slcmes;
168  std::vector< art::Ptr<me::TrkME> > trkmes;
169 
170  fms .get(s, showers );
171  fmp .get(s, prongs );
172  fmv .get(s, vertices);
173  fmelid .get(s, eLIDs );
174  fmcr .get(s, cosrejs );
175  fmcvn .get(s, cvns );
176  fmnueveto.get(s, nuevetos);
177  fmslcme .get(s, slcmes );
178  fmtrkme .get(s, trkmes );
179  if( fInstanceLabel.find("2017") == std::string::npos &&
180  fInstanceLabel.find("2018") == std::string::npos ) /// Only check if not 2017 and 2018 analysis. To be updated for future analyses.
181  fmlem .get(s, lems );
182 
183  // sort the showers in order of decreasing energy
184  // std::sort(showers.begin(), showers.end(), skim::showerByEnergy);
185  std::sort(showers.begin(), showers.end(), showerByEnergyNue);
186 
187  // sort the prongs in order of decreasing length
188  // std::sort(prongs.begin(), prongs.end(), skim::prongPtrByLength);
189  // std::sort(prongs.begin(), prongs.end(), skim::prongByLength);
190  std::sort(prongs.begin(), prongs.end(), prongByLengthNue);
191 
192  // create the new copy of the slice.
193  su.CopySlice(slices[s], *sliceOut, sliceNum);
194  su.CopyShowers(prod, e, showers, *showerOut, *sliceOut, *slcShwAssn);
195  su.CopyProngs (prod, e, prongs, *prongOut, *sliceOut, *slcPrgAssn);
196  su.CopyVertex (prod, e, vertices[0], *vertexOut, *sliceOut, *slcVtxAssn);
197  su.CopyProductAndSliceAssn(prod, e, eLIDs, *elidOut, *sliceOut, *slcELDAssn);
198  su.CopyProductAndSliceAssn(prod, e, cosrejs, *cosrejOut, *sliceOut, *slcCRJAssn);
199  su.CopyProductAndSliceAssn(prod, e, cvns, *cvnOut, *sliceOut, *slcCVNAssn);
200  su.CopyProductAndSliceAssn(prod, e, nuevetos, *nuevetoOut, *sliceOut, *slcNueVetoAssn);
201  if( fInstanceLabel.find("2017") == std::string::npos &&
202  fInstanceLabel.find("2018") == std::string::npos ) /// Only check if not 2017 and 2018 analysis. To be updated for future analyses.
203  su.CopyProductAndSliceAssn(prod, e, lems, *lemOut, *sliceOut, *slcLEMAssn);
204 
205  this->CopyShowerLID(e, prod, showers, *slidOut, *sliceOut, *showerOut, *slcSLDAssn, *shwSLDAssn);
206  this->CopyProngCVN( e, prod, prongs, *pidOut, *sliceOut, *prongOut, *slcPIDAssn, *pngPIDAssn); /// 2017
207 
208  this->CopyShowerPngAssn(e, prod, showers, prongs, *showerOut, *prongOut, *shwPngAssn); /// 2017 - copy Shower Prong association needed for Nue Energy
209 
210  this->CopyMichelSlice(e, prod, slcmes, *slcmeOut, *sliceOut, *slcSlcMEAssn);
211  this->CopyMichelTrack(e, prod, trkmes, *trkmeOut, *sliceOut, *slcTrkMEAssn);
212 
213  // finally check to see if this is MC, and if so make the association to MCTruth
214  if( !e.isRealData() )
215  su.SliceMCTruthAssociation(prod,
216  e,
217  s,
218  *sliceOut,
219  *slcTruAssn,
220  *slcFlxAssn,
221  *slcFlxWgtAssn,
222  *slcGTruAssn,
225 
226  } // end loop over the slices
227 
228  e.put(std::move(sliceOut), fInstanceLabel);
229  e.put(std::move(showerOut), fInstanceLabel);
230  e.put(std::move(prongOut), fInstanceLabel);
231  e.put(std::move(vertexOut), fInstanceLabel);
232  e.put(std::move(elidOut), fInstanceLabel);
233  e.put(std::move(slidOut), fInstanceLabel);
234  e.put(std::move(cvnOut), fInstanceLabel);
235  e.put(std::move(nuevetoOut), fInstanceLabel);
236  e.put(std::move(slcmeOut), fInstanceLabel);
237  e.put(std::move(trkmeOut), fInstanceLabel);
238  e.put(std::move(cosrejOut), fInstanceLabel);
239  if( fInstanceLabel.find("2017") == std::string::npos &&
240  fInstanceLabel.find("2018") == std::string::npos ) /// Only check if not 2017 and 2018 analysis. To be updated for future analyses.
241  e.put(std::move(lemOut), fInstanceLabel);
242 
243  e.put(std::move(slcVtxAssn), fInstanceLabel);
244  e.put(std::move(slcShwAssn), fInstanceLabel);
245  e.put(std::move(slcPrgAssn), fInstanceLabel);
246  e.put(std::move(slcELDAssn), fInstanceLabel);
247  e.put(std::move(slcSLDAssn), fInstanceLabel);
248  e.put(std::move(shwSLDAssn), fInstanceLabel);
249  e.put(std::move(slcCRJAssn), fInstanceLabel);
250  e.put(std::move(slcTruAssn), fInstanceLabel);
251  e.put(std::move(slcFlxAssn), fInstanceLabel);
252  e.put(std::move(slcFlxWgtAssn), fInstanceLabel);
253  e.put(std::move(slcGTruAssn), fInstanceLabel);
254  e.put(std::move(slcCVNAssn), fInstanceLabel);
255  e.put(std::move(slcNueVetoAssn), fInstanceLabel);
256  e.put(std::move(slcSlcMEAssn), fInstanceLabel);
257  e.put(std::move(slcTrkMEAssn), fInstanceLabel);
258  if( fInstanceLabel.find("2017") == std::string::npos &&
259  fInstanceLabel.find("2018") == std::string::npos ) /// Only check if not 2017 and 2018 analysis. To be updated for future analyses.
260  e.put(std::move(slcLEMAssn), fInstanceLabel);
261 
262  e.put(std::move(pidOut), fInstanceLabel);
263  e.put(std::move(slcPIDAssn), fInstanceLabel);
264  e.put(std::move(pngPIDAssn), fInstanceLabel);
265  e.put(std::move(shwPngAssn), fInstanceLabel);
266 
267  return;
268 }
269 
270 //------------------------------------------------------------------------------
272  art::EDProducer const& prod,
273  std::vector< art::Ptr<rb::Shower> > const& showerIn,
274  std::vector<slid::ShowerLID> & slidOut,
275  std::vector<rb::Cluster> & sliceOut,
276  std::vector<rb::Shower> & showerOut,
279 {
280 
281  // do a FindOne for the shower to ShowerLID connection. Copy the found ShowerLID into the
282  // output vector, then make the associations
283  art::FindOne<slid::ShowerLID> foslid(showerIn, e, fLIDLabel);
284 
285  // we may be calling this multiple times in an event because there are several slices
286  // that passed the selection. figure out where the showers for this slice start in
287  // the output vector as that is important for the creation of the slid to shower associations
288  size_t offset = showerOut.size() - showerIn.size();
289 
290  for(size_t s = 0; s < showerIn.size(); ++s){
292  if( slid.isValid() ){
293  slidOut.push_back( slid.ref() );
294  util::CreateAssn(prod,
295  e,
296  showerOut,
297  slidOut,
298  shwSLDAssn,
299  slidOut.size()-1,
300  slidOut.size(),
301  s + offset,
304  util::CreateAssn(prod,
305  e,
306  sliceOut,
307  slidOut,
308  slcSLDAssn,
309  slidOut.size()-1,
310  slidOut.size(),
311  UINT_MAX,
314  }
315  }
316 
317  return;
318 }
319 
320 
321 
322 
323 
324 
326  art::EDProducer const& prod,
327  std::vector< art::Ptr<rb::Prong> > const& prongIn,
328  std::vector<rb::PID> & pidOut,
329  std::vector<rb::Cluster> & sliceOut,
330  std::vector<rb::Prong> & prongOut,
332  art::Assns<rb::Prong, rb::PID> & pngPIDAssn)
333 {
334 
335  art::FindManyP<rb::PID> fmpid(prongIn, e, fCVNProngLabel);
336 
337  // we may be calling this multiple times in an event because there are several slices
338  // that passed the selection. figure out where the showers for this slice start in
339  // the output vector as that is important for the creation of the slid to shower associations
340  size_t offset = prongOut.size() - prongIn.size();
341 
342  std::vector< art::Ptr<rb::PID>> pidvec;
343  for(size_t s = 0; s < prongIn.size(); ++s){
344 
345  pidvec.clear();
346  fmpid.get(s, pidvec);
347 
348  for(auto pid : pidvec ){
349  // make a copy of the PID, you can't just copy the location of the
350  // previous one.
351  pidOut.emplace_back(pid->Pdg(), pid->Value());
352  util::CreateAssn(prod,
353  e,
354  prongOut,
355  pidOut,
356  pngPIDAssn,
357  pidOut.size()-1,
358  pidOut.size(),
359  s + offset,
362  util::CreateAssn(prod,
363  e,
364  sliceOut,
365  pidOut,
366  slcPIDAssn,
367  pidOut.size()-1,
368  pidOut.size(),
369  UINT_MAX,
372  }
373  }
374 
375  return;
376 }
377 
378 
379 
380 //------------------------------------------------------------------------------
382  art::EDProducer const& prod,
383  std::vector< art::Ptr<rb::Shower> > const& showerIn,
384  std::vector< art::Ptr<rb::Prong> > const& prongIn,
385  std::vector<rb::Shower> & showerOut,
386  std::vector<rb::Prong> & prongOut,
388 
389 {
390 
391 
392 
393 
394 
395  art::FindOneP<rb::Shower> fmshower(prongIn, e, "recluster" );
396 
397 
398  // we may be calling this multiple times in an event because there are several slices
399  // that passed the selection. figure out where the showers for this slice start in
400  // the output vector as that is important for the creation of the slid to shower associations
401  size_t offset = showerOut.size() - showerIn.size();
402 
403  for(unsigned int iPng=0; iPng<prongIn.size(); ++iPng ){
404 
405  art::Ptr<rb::Shower> slid = fmshower.at(iPng);
406 
407  for(unsigned int iShw=0; iShw<showerOut.size(); ++iShw ){
408 
409  if(slid->TotalLength() == showerOut[iShw].TotalLength()) {
410 
411  util::CreateAssn(prod,
412  e,
413  showerOut,
414  prongOut,
415  shwPngAssn,
416  iPng,
417  iPng+1,
418  iShw + offset, ///
421 
422  } // if
423  } // for iShw
424 
425  } // for iPng
426 
427  LOG_DEBUG("NueSkimmer") << "NueSkimmer - CopyShowerPngAssn Summary : "
428  << "\n Input Showers vector size " << showerIn.size()
429  << "\n Output Showers vector size " << showerOut.size();
430  return;
431 }
432 
433 
434 //------------------------------------------------------------------------------
436  art::EDProducer const& prod,
437  std::vector<art::Ptr<me::SlcME> > const& objIn,
438  std::vector<me::SlcME> & objOut,
439  std::vector<rb::Cluster> & sliceOut,
441 {
442 
443  // need to create a ptr to the slice into the new object.
444  art::ProductID slcID = prod.getProductID< std::vector<rb::Cluster> >(fInstanceLabel);
445  art::Ptr<rb::Cluster> slcPtr(slcID, sliceOut.size() - 1, e.productGetter(slcID));
446 
447  me::SlcME slcME;
448 
449  for(auto in : objIn){
450 
451  slcME.SetMID (in->MID() );
452  slcME.SetParentSlc(slcPtr );
453  slcME.SetDeltaT (in->DeltaT() );
454  slcME.SetDistToSlc(in->DistToSlc());
455 
456  objOut.push_back( slcME );
457 
458  util::CreateAssn(prod,
459  e,
460  sliceOut,
461  objOut,
462  slcMEAssn,
463  objOut.size()-1,
464  objOut.size(),
465  UINT_MAX,
468  }
469 
470  return;
471 }
472 
473 //------------------------------------------------------------------------------
475  art::EDProducer const& prod,
476  std::vector<art::Ptr<me::TrkME> > const& objIn,
477  std::vector<me::TrkME> & objOut,
478  std::vector<rb::Cluster> & sliceOut,
480 {
481 
482  // need to create a ptr to the slice into the new object.
483  art::ProductID slcID = prod.getProductID< std::vector<rb::Cluster> >(fInstanceLabel);
484  art::Ptr<rb::Cluster> slcPtr(slcID, sliceOut.size() - 1, e.productGetter(slcID));
485 
486  me::TrkME trkME;
487 
488  for(auto in : objIn){
489 
490  trkME.SetMID (in->MID() );
491  trkME.SetParentSlc(slcPtr );
492  trkME.SetDeltaT (in->DeltaT() );
493  trkME.SetDistToSlc(in->DistToSlc());
494 
495  // Intentionally not copying the art::Ptr to the parent kalman track
496  // here because it does not appear to be used for the BEND decomposition
497  // We can revisit that decision if necessary, but it will make the
498  // bookkeeping much harder.
499 
500  objOut.push_back( trkME );
501 
502  util::CreateAssn(prod,
503  e,
504  sliceOut,
505  objOut,
506  slcMEAssn,
507  objOut.size()-1,
508  objOut.size(),
509  UINT_MAX,
512  }
513 
514  return;
515 }
516 
517 
518 //------------------------------------------------------------------------------
520 {
521  fVertexLabel = p.get<std::string>("VertexLabel", "elasticarmshs" );
522  fShowerLabel = p.get<std::string>("ShowerLabel", "recluster" );
523  fLIDLabel = p.get<std::string>("LIDLabel", "slid" );
524  fLEMLabel = p.get<std::string>("LEMLabel", "lem" );
525  if( fInstanceLabel.find("2018") == std::string::npos ) // chek it is not 2018 Analysis
526  fCVNLabel = p.get<std::string>("CVNLabel", "cvneval" );
527  else
528  fCVNLabel = p.get<std::string>("CVNLabel", "cvnevalprod3train");
529  fCVNProngLabel = p.get<std::string>("CVNProngLabel", "cvnprongeval" );
530  fCosRejLabel = p.get<std::string>("CosRejLabel", "nuecosrej" );
531  fCAFLabel = p.get<std::string>("CAFLabel", "cafmaker" );
532  fGeneratorLabel = p.get<std::string>("GeneratorLabel", "generator" );
533  fFluxWeightLabel = p.get<std::string>("FluxWeightLabel", "ppfxcorrection" );
534  fNueVetoLabel = p.get<std::string>("NueVetoLabel", "veto" );
535  fMichelLabel = p.get<std::string>("MichelLabel", "mefinder" );
536 
537  auto prongTag = p.get<std::string>("ProngTag", "fuzzykvertex:Prong3D");
538  auto pos = prongTag.find(":");
539  fProngTag = art::InputTag(prongTag.substr(0, pos),
540  prongTag.substr(pos+1, prongTag.size()));
541 
542  return;
543 }
EDProductGetter const * productGetter(ProductID const) const
bool CopyProngs(art::EDProducer const &prod, art::Event &e, std::vector< art::Ptr< rb::Prong > > const &prongIn, std::vector< rb::Prong > &prongOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, rb::Prong > &slcPrgAssn)
void CopyMichelTrack(art::Event &e, art::EDProducer const &prod, std::vector< art::Ptr< me::TrkME > > const &objIn, std::vector< me::TrkME > &objOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, me::TrkME > &slcMEAssn)
Definition: NueSkimmer.cxx:474
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
size_type size() const
Definition: Assns.h:440
bool CopyShowers(art::EDProducer const &prod, art::Event &e, std::vector< art::Ptr< rb::Shower > > const &showerIn, std::vector< rb::Shower > &showerOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, rb::Shower > &slcShwAssn)
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
std::string fCosRejLabel
label of module creating cosrejs
Definition: NueSkimmer.h:90
void reconfigure(fhicl::ParameterSet const &p)
Definition: NueSkimmer.cxx:519
const char * p
Definition: xmltok.h:285
bool SliceMCTruthAssociation(art::EDProducer const &prod, art::Event &e, size_t const &slcIdx, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, simb::MCTruth > &slcTruAssn, art::Assns< rb::Cluster, simb::MCFlux > &slcFlxAssn, art::Assns< rb::Cluster, fxwgt::FluxWeights > &slcFlxWgtAssn, art::Assns< rb::Cluster, simb::GTruth > &slcGTruAssn, std::string const &generatorLabel, std::string const &fluxWeightLabel)
std::string fLEMLabel
label of module creating lems
Definition: NueSkimmer.h:89
bool CopyProductAndSliceAssn(art::EDProducer const &prod, art::Event &e, std::vector< art::Ptr< T > > const &objIn, std::vector< T > &objOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, T > &slcCROAssn)
art::InputTag fProngTag
input tag of module creating showers
Definition: NueSkimmer.h:87
std::string fCVNLabel
label of module creating cvns
Definition: NueSkimmer.h:94
ProductID getProductID(std::string const &instanceName={}) const
Definition: EDProducer.h:123
bool isRealData() const
Definition: Event.h:83
bool CopySlice(art::Ptr< rb::Cluster > const &sliceIn, std::vector< rb::Cluster > &sliceOut, size_t &sliceNum)
art::InputTag fInputTag
combination of the above two strings
Definition: BaseSkimmer.h:45
Module to create a summary of total POT seen in a job.
Definition: Evaluator.h:27
std::string fShowerLabel
label of module creating showers
Definition: NueSkimmer.h:86
object containing MC flux information
void CopyShowerLID(art::Event &e, art::EDProducer const &prod, std::vector< art::Ptr< rb::Shower > > const &showerIn, std::vector< slid::ShowerLID > &slidOut, std::vector< rb::Cluster > &sliceOut, std::vector< rb::Shower > &showerOut, art::Assns< rb::Cluster, slid::ShowerLID > &slcSLDAssn, art::Assns< rb::Shower, slid::ShowerLID > &shwSLDAssn)
Definition: NueSkimmer.cxx:271
std::string fCVNProngLabel
label of module creating prongs cvn
Definition: NueSkimmer.h:97
virtual double TotalLength() const
Length (cm) of a shower.
Definition: Shower.cxx:43
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
const XML_Char * s
Definition: expat.h:262
virtual double TotalLength() const
Distance along prong to reach last cell hit.
Definition: Prong.cxx:186
Result for CVN.
double CalorimetricEnergy(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple estimate of neutrino energy.
Definition: Cluster.cxx:439
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fMichelLabel
label of module creating slice Michel e&#39;s
Definition: NueSkimmer.h:96
void SetMID(double)
Definition: MEClusters.cxx:18
void CopyShowerPngAssn(art::Event &e, art::EDProducer const &prod, std::vector< art::Ptr< rb::Shower > > const &showerIn, std::vector< art::Ptr< rb::Prong > > const &prongIn, std::vector< rb::Shower > &showerOut, std::vector< rb::Prong > &prongOut, art::Assns< rb::Shower, rb::Prong > &shwPngAssn)
Definition: NueSkimmer.cxx:381
Vertex location in position and time.
T prod(const std::vector< T > &v)
Definition: prod.hpp:17
NueSkimmer(fhicl::ParameterSet const &p)
Definition: NueSkimmer.cxx:54
std::string fFluxWeightLabel
label of module creating flux weights
Definition: NueSkimmer.h:93
std::string fGeneratorLabel
label of module generating events
Definition: NueSkimmer.h:92
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
ifstream in
Definition: comparison.C:7
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
void CopyProngCVN(art::Event &e, art::EDProducer const &prod, std::vector< art::Ptr< rb::Prong > > const &prongIn, std::vector< rb::PID > &pidOut, std::vector< rb::Cluster > &sliceOut, std::vector< rb::Prong > &prongOut, art::Assns< rb::Cluster, rb::PID > &slcPIDAssn, art::Assns< rb::Prong, rb::PID > &pngPIDAssn)
Definition: NueSkimmer.cxx:325
bool prongByLengthNue(art::Ptr< rb::Prong > p1, art::Ptr< rb::Prong > p2)
Definition: NueSkimmer.cxx:47
std::string fCAFLabel
label of module creating StandardRecords
Definition: NueSkimmer.h:91
std::string fInstanceLabel
instance label for products created by this skimmer
Definition: BaseSkimmer.h:44
Build slid::LID objects to store electron ID, if asked for, otherwise, calculate LID info and make av...
Definition: FillPIDs.h:13
std::string fVertexLabel
label of module creating vertex
Definition: NueSkimmer.h:85
size_type get(size_type i, reference item, data_reference data) const
Definition: FindManyP.h:469
#define LOG_VERBATIM(category)
Object collecting Preselection variables.
Float_t e
Definition: plot.C:35
bool CopyVertex(art::EDProducer const &prod, art::Event &e, art::Ptr< rb::Vertex > const &vertexIn, std::vector< rb::Vertex > &vertexOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, rb::Vertex > &slcVtxAssn)
bool showerByEnergyNue(art::Ptr< rb::Shower > s1, art::Ptr< rb::Shower > s2)
Definition: NueSkimmer.cxx:41
void Skim(art::Event &e, art::EDProducer const &prod)
Definition: NueSkimmer.cxx:64
Definition: fwd.h:28
std::string fNueVetoLabel
label of module creating nuevetos
Definition: NueSkimmer.h:95
bool failedToGet() const
Definition: Handle.h:196
std::string fLIDLabel
label of module creating lids
Definition: NueSkimmer.h:88
void CopyMichelSlice(art::Event &e, art::EDProducer const &prod, std::vector< art::Ptr< me::SlcME > > const &objIn, std::vector< me::SlcME > &objOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, me::SlcME > &slcMEAssn)
Definition: NueSkimmer.cxx:435