NumuSkimmer.cxx
Go to the documentation of this file.
1 //
2 // NumuSkimmer.cxx
3 //
4 // Created by Brian Rebel on 2/18/16.
5 //
6 
10 
11 #include "CosRej/CosRejObj.h"
12 #include "CosRej/NueCosRej.h"
13 #include "Preselection/Veto.h"
14 #include "ReMId/ReMId.h"
15 #include "ShowerLID/EventLID.h"
16 #include "CVN/func/Result.h"
17 #include "QEEventFinder/QePId.h"
19 #include "NumuEnergy/NumuE.h"
20 #include "RecoBase/Prong.h"
21 #include "RecoBase/Shower.h"
22 #include "RecoBase/Vertex.h"
23 #include "RecoBase/Track.h"
24 #include "Utilities/AssociationUtil.h"
25 
28 
32 
33 
34 //------------------------------------------------------------------------------
36 {
37  return s1->CalorimetricEnergy() > s2->CalorimetricEnergy();
38 }
39 
40 //------------------------------------------------------------------------------
42 {
43  return p1->TotalLength() > p2->TotalLength();
44 }
45 
46 
47 //------------------------------------------------------------------------------
50 {
51  this->reconfigure(p);
52 
53  return;
54 }
55 
56 //------------------------------------------------------------------------------
58  art::EDProducer const& prod)
59 {
60  // get the CellHits made in the previous module
62  e.getByLabel(fInputTag, cellHits);
63 
64  if(cellHits.failedToGet() ){
65  LOG_VERBATIM("NumuSkimmer")
66  << "There are no numu CellHits for this event, don't try to skim anything.";
67  return;
68  }
69 
70  // if we are in this module, then this event has interesting slices.
71  // to facilitate making copies of the rb::XXX objects we want, make
72  // a map of the cell unique id values to the art::Ptr of the copy
73  // from the previous module
74  skim::SkimmingUtils su(cellHits, fInstanceLabel);
75 
76  // get the slices out of the event
78  e.getByLabel(fInputTag, sliceHandle);
79  art::PtrVector<rb::Cluster> slices = *sliceHandle;
80 
81  art::Handle<std::vector<int> > sliceNumHandle;
82  e.getByLabel(fInputTag, sliceNumHandle);
83 
84  LOG_DEBUG("NumuSkimmer")
85  << "there are "
86  << slices.size()
87  << " slices in this event";
88 
89  // now we are sure we have all the data products we need, declare the items to store in the event
90  // As long as we do a drop on output we will keep all the necessary provanence information on how
91  // each item was created. The information is left in the configuration DB intact, and we know what
92  // modules created which input data product by the module label configurations for this module.
93  std::unique_ptr< std::vector<rb::Energy> > energyOut (new std::vector<rb::Energy> );
94  std::unique_ptr< std::vector<rb::Cluster> > sliceOut (new std::vector<rb::Cluster> );
95  std::unique_ptr< std::vector<rb::Track> > trackOut (new std::vector<rb::Track> );
96  std::unique_ptr< std::vector<rb::Track> > cosTrkOut (new std::vector<rb::Track> );
97  std::unique_ptr< std::vector<cosrej::CosRejObj> > cosRejOut (new std::vector<cosrej::CosRejObj> );
98  std::unique_ptr< std::vector<cosrej::NueCosRej> > nueCosRejOut (new std::vector<cosrej::NueCosRej> ); // 2017
99  std::unique_ptr< std::vector<rb::Shower> > showerOut (new std::vector<rb::Shower> ); // 2017
100  std::unique_ptr< std::vector<rb::Prong> > prongOut (new std::vector<rb::Prong> ); // 2017
101  std::unique_ptr< std::vector<rb::Vertex> > vertexOut (new std::vector<rb::Vertex> ); // 2017
102  std::unique_ptr< std::vector<slid::EventLID> > elidOut (new std::vector<slid::EventLID> ); // 2017
103  std::unique_ptr< std::vector<slid::ShowerLID> > slidOut (new std::vector<slid::ShowerLID> ); // 2017
104  std::unique_ptr< std::vector<cvn::Result> > cvnOut (new std::vector<cvn::Result> ); // 2017
105 
106  std::unique_ptr< std::vector<numusand::NumuSandObj> > sandOut (new std::vector<numusand::NumuSandObj> );
107  std::unique_ptr< std::vector<presel::Veto> > vetoOut (new std::vector<presel::Veto> );
108  std::unique_ptr< std::vector<qeef::QePId> > qepidOut (new std::vector<qeef::QePId> );
109  std::unique_ptr< std::vector<remid::ReMId> > remidOut (new std::vector<remid::ReMId> );
110  std::unique_ptr< std::vector<numue::NumuE> > numuEOut (new std::vector<numue::NumuE> );
111  std::unique_ptr< art::Assns<rb::Cluster, rb::Track> > slcTrkAssn (new art::Assns<rb::Cluster, rb::Track> );
112  std::unique_ptr< art::Assns<rb::Cluster, rb::Track> > slcCosTrkAssn(new art::Assns<rb::Cluster, rb::Track> );
113  std::unique_ptr< art::Assns<rb::Cluster, cosrej::CosRejObj> > slcCROAssn (new art::Assns<rb::Cluster, cosrej::CosRejObj> );
114  std::unique_ptr< art::Assns<rb::Cluster, cosrej::NueCosRej> > slcNueCRAssn (new art::Assns<rb::Cluster, cosrej::NueCosRej> ); // 2017
115  std::unique_ptr< art::Assns<rb::Cluster, cvn::Result> > slcCVNAssn (new art::Assns<rb::Cluster, cvn::Result> ); // 2017
116  std::unique_ptr< art::Assns<rb::Cluster, rb::Shower> > slcShwAssn (new art::Assns<rb::Cluster, rb::Shower> ); // 2017
117  std::unique_ptr< art::Assns<rb::Cluster, rb::Prong> > slcPrgAssn (new art::Assns<rb::Cluster, rb::Prong> ); // 2017
118  std::unique_ptr< art::Assns<rb::Cluster, rb::Vertex> > slcVtxAssn (new art::Assns<rb::Cluster, rb::Vertex> ); // 2017
119  std::unique_ptr< art::Assns<rb::Cluster, slid::ShowerLID> > slcSLDAssn (new art::Assns<rb::Cluster, slid::ShowerLID>); // 2017
120  std::unique_ptr< art::Assns<rb::Shower, slid::ShowerLID> > shwSLDAssn (new art::Assns<rb::Shower, slid::ShowerLID>); // 2017
121  std::unique_ptr< art::Assns<rb::Cluster, numusand::NumuSandObj> > slcNSOAssn (new art::Assns<rb::Cluster, numusand::NumuSandObj>);
122  std::unique_ptr< art::Assns<rb::Cluster, presel::Veto> > slcVetAssn (new art::Assns<rb::Cluster, presel::Veto> );
123  std::unique_ptr< art::Assns<rb::Cluster, qeef::QePId> > slcQEPAssn (new art::Assns<rb::Cluster, qeef::QePId> );
124  std::unique_ptr< art::Assns<rb::Cluster, numue::NumuE> > slcNMEAssn (new art::Assns<rb::Cluster, numue::NumuE> );
125  std::unique_ptr< art::Assns<rb::Track, remid::ReMId> > trkREMAssn (new art::Assns<rb::Track, remid::ReMId> );
126  std::unique_ptr< art::Assns<rb::Track, rb::Energy> > trkEngAssn (new art::Assns<rb::Track, rb::Energy> );
127  std::unique_ptr< art::Assns<rb::Cluster, simb::MCTruth> > slcTruAssn (new art::Assns<rb::Cluster, simb::MCTruth> );
128  std::unique_ptr< art::Assns<rb::Cluster, simb::MCFlux> > slcFlxAssn (new art::Assns<rb::Cluster, simb::MCFlux> );
129  std::unique_ptr< art::Assns<rb::Cluster, fxwgt::FluxWeights> > slcFlxWgtAssn(new art::Assns<rb::Cluster, fxwgt::FluxWeights> );
130  std::unique_ptr< art::Assns<rb::Cluster, simb::GTruth> > slcGTruAssn (new art::Assns<rb::Cluster, simb::GTruth> );
131 
132 
133  // get the FindMany for the slices to shower association.
134  art::FindManyP<rb::Shower> fms (slices, e, fShowerLabel );
135  art::FindManyP<rb::Vertex> fmvx (slices, e, fVertexLabel );
137  art::FindManyP<rb::Track> fmct (slices, e, fCosmicLabel );
139  art::FindManyP<cosrej::NueCosRej> fmnuecr(slices, e, fNueCosRejLabel); /// 2017
140  art::FindManyP<rb::Prong> fmp (slices, e, fProngTag ); /// 2017
141 
143  art::FindManyP<presel::Veto> fmv (slices, e, fVetoLabel );
144  art::FindManyP<qeef::QePId> fmqe (slices, e, fQePIdLabel );
145  art::FindManyP<numue::NumuE> fme (slices, e, fNumuELabel );
146  art::FindManyP<cvn::Result> fmcvn (slices, e, fCVNLabel ); // 2017
147 
148  size_t sliceNum = 0;
149  for(size_t s = 0; s < slices.size(); ++s){
150 
151  sliceNum = sliceNumHandle->at(s);
152 
153  // vector of art::Ptrs for the FindManyP calls
154  std::vector< art::Ptr<rb::Track> > tracks;
155  std::vector< art::Ptr<rb::Track> > cosmics;
156  std::vector< art::Ptr<cosrej::CosRejObj> > cosrejs;
157  std::vector< art::Ptr<cosrej::NueCosRej> > nuecosrejs; /// 2017
158  std::vector< art::Ptr<rb::Shower> > showers; /// 2017
159  std::vector< art::Ptr<rb::Prong> > prongs; /// 2017
160  std::vector< art::Ptr<rb::Vertex> > vertices; /// 2017
161  std::vector< art::Ptr<cvn::Result> > cvns; /// 2017
162  std::vector< art::Ptr<numusand::NumuSandObj> > sands;
163  std::vector< art::Ptr<presel::Veto> > vetos;
164  std::vector< art::Ptr<qeef::QePId> > qepids;
165  std::vector< art::Ptr<numue::NumuE> > numues;
166 
167  fmt .get( s, tracks );
168  fmct .get( s, cosmics );
169  fmcr .get( s, cosrejs );
170  fmnuecr.get(s, nuecosrejs); /// 2017
171  fms .get( s, showers ); /// 2017
172  fmp .get( s, prongs ); /// 2017
173  fmvx .get( s, vertices); /// 2017
174  fmcvn.get( s, cvns ); /// 2017
175  fmns .get( s, sands );
176  fmv .get( s, vetos );
177  fmqe .get( s, qepids );
178  fme .get( s, numues );
179 
180  // sort the showers in order of decreasing energy
181  // std::sort(showers.begin(), showers.end(), skim::showerByEnergy);
182  std::sort(showers.begin(), showers.end(), showerByEnergyNumu);
183 
184  // sort the prongs in order of decreasing length
185  // std::sort(prongs.begin(), prongs.end(), skim::prongPtrByLength);
186  // std::sort(prongs.begin(), prongs.end(), skim::prongByLength);
187  std::sort(prongs.begin(), prongs.end(), prongByLengthNumu);
188 
189  // create the new copies of the desired data products
190  su.CopySlice(slices[s], *sliceOut, sliceNum);
191 
192  su.CopyVertex (prod, e, vertices[0], *vertexOut, *sliceOut, *slcVtxAssn); /// 2017
193  su.CopyProngs (prod, e, prongs, *prongOut, *sliceOut, *slcPrgAssn); /// 2017
194  su.CopyShowers(prod, e, showers, *showerOut, *sliceOut, *slcShwAssn); /// 2017
195 
196  su.CopyTracks(prod, e, tracks, *trackOut, *sliceOut, *slcTrkAssn );
197  su.CopyTracks(prod, e, cosmics, *cosTrkOut, *sliceOut, *slcCosTrkAssn, fInstanceLabel, fCosmicInstance);
198  su.CopyProductAndSliceAssn(prod, e, cosrejs, *cosRejOut, *sliceOut, *slcCROAssn);
199  su.CopyProductAndSliceAssn(prod, e, nuecosrejs, *nueCosRejOut, *sliceOut, *slcNueCRAssn); // 2017
200 
201  su.CopyProductAndSliceAssn(prod, e, cvns, *cvnOut, *sliceOut, *slcCVNAssn);
202  su.CopyProductAndSliceAssn(prod, e, sands, *sandOut, *sliceOut, *slcNSOAssn);
203  su.CopyProductAndSliceAssn(prod, e, vetos, *vetoOut, *sliceOut, *slcVetAssn);
204  su.CopyProductAndSliceAssn(prod, e, qepids, *qepidOut, *sliceOut, *slcQEPAssn);
205  su.CopyProductAndSliceAssn(prod, e, numues, *numuEOut, *sliceOut, *slcNMEAssn);
206  this->CopyTrackAssn(e, prod, tracks, *remidOut, *trackOut, *trkREMAssn, fReMIdLabel);
207  this->CopyTrackAssn(e, prod, tracks, *energyOut, *trackOut, *trkEngAssn, fEnergyLabel);
208  this->CopyShowerLID(e, prod, showers, *slidOut, *sliceOut, *showerOut, *slcSLDAssn, *shwSLDAssn); /// 2017
209 
210  //this->CopyMichelEClusters(e, prod, tracks, *michelEOut, *sliceOut, *trackOut, *slcMECAssn, *trkMECAssn);
211 
212  // apparently we can't count on a vertex object being present in the
213  // reconstruction. As no cuts depend on them, just remove them for now
214  //std::vector< art::Ptr<rb::Vertex> > vertices;
215  //fmvx.get(s, vertices);
216  //su.CopyVertex(prod, e, vertices[0], *vertexOut, *sliceOut, *slcVtxAssn);
217 
218  // finally check to see if this is MC, and if so make the association to MCTruth
219  if( !e.isRealData() )
220  su.SliceMCTruthAssociation(prod,
221  e,
222  s,
223  *sliceOut,
224  *slcTruAssn,
225  *slcFlxAssn,
226  *slcFlxWgtAssn,
227  *slcGTruAssn,
230 
231  } // end loop over the slices
232 
233 
234  e.put(std::move(sliceOut), fInstanceLabel);
235  e.put(std::move(energyOut), fInstanceLabel);
236  e.put(std::move(trackOut), fInstanceLabel);
237  e.put(std::move(cosRejOut), fInstanceLabel);
238  e.put(std::move(nueCosRejOut), fInstanceLabel); /// 2017
239  e.put(std::move(showerOut), fInstanceLabel); /// 2017
240  e.put(std::move(prongOut), fInstanceLabel); /// 2017
241  e.put(std::move(vertexOut), fInstanceLabel); /// 2017
242  e.put(std::move(slidOut), fInstanceLabel); /// 2017
243  e.put(std::move(cvnOut), fInstanceLabel); /// 2017
244  e.put(std::move(sandOut), fInstanceLabel);
245  e.put(std::move(vetoOut), fInstanceLabel);
246  e.put(std::move(qepidOut), fInstanceLabel);
247  e.put(std::move(remidOut), fInstanceLabel);
248  e.put(std::move(numuEOut), fInstanceLabel);
249  e.put(std::move(slcTrkAssn), fInstanceLabel);
250  e.put(std::move(slcCROAssn), fInstanceLabel);
251 
252  e.put(std::move(slcNueCRAssn), fInstanceLabel); /// 2017
253  e.put(std::move(slcVtxAssn), fInstanceLabel); /// 2017
254  e.put(std::move(slcShwAssn), fInstanceLabel); /// 2017
255  e.put(std::move(slcPrgAssn), fInstanceLabel); /// 2017
256  e.put(std::move(slcSLDAssn), fInstanceLabel); /// 2017
257  e.put(std::move(shwSLDAssn), fInstanceLabel); /// 2017
258  e.put(std::move(slcCVNAssn), fInstanceLabel); /// 2017
259  e.put(std::move(slcNSOAssn), fInstanceLabel);
260  e.put(std::move(slcVetAssn), fInstanceLabel);
261  e.put(std::move(slcQEPAssn), fInstanceLabel);
262  e.put(std::move(slcNMEAssn), fInstanceLabel);
263  e.put(std::move(trkREMAssn), fInstanceLabel);
264  e.put(std::move(trkEngAssn), fInstanceLabel);
265  e.put(std::move(slcTruAssn), fInstanceLabel);
266  e.put(std::move(slcFlxAssn), fInstanceLabel);
267  e.put(std::move(slcFlxWgtAssn), fInstanceLabel);
268  e.put(std::move(slcGTruAssn), fInstanceLabel);
269 
270  // cosmic ray tracks
271  e.put(std::move(cosTrkOut), fCosmicInstance);
272  e.put(std::move(slcCosTrkAssn), fCosmicInstance);
273 
274  //e.put(std::move(showerOut), fInstanceLabel);
275  //e.put(std::move(vertexOut), fInstanceLabel);
276  //e.put(std::move(michelEOut));
277  //e.put(std::move(slcShwAssn), fInstanceLabel);
278  //e.put(std::move(slcVtxAssn), fInstanceLabel);
279  //e.put(std::move(slcMECAssn));
280  //e.put(std::move(trkMECAssn));
281 
282  return;
283 }
284 
285 //------------------------------------------------------------------------------
286 //void skim::NumuSkimmer::CopyMichelEClusters(art::Event &e,
287 // art::EDProducer const& prod,
288 // std::vector<art::Ptr<rb::Track> > const& trackIn,
289 // std::vector<me::MichelECluster> & michelEOut,
290 // std::vector<rb::Cluster> & sliceOut,
291 // std::vector<rb::Track> & trackOut,
292 // art::Assns<rb::Cluster, me::MichelECluster> & slcMECAssn,
293 // art::Assns<rb::Track, me::MichelECluster> & trkMECAssn)
294 //{
295 // // this method requires the trackOut collection to have already been filled. All
296 // // tracks from the slice are assumed to be copied into the skimmed slice and in the
297 // // same order as the tracks from the original slice (ie trackIn)
298 // if( trackOut.size() != trackIn.size() )
299 // throw cet::exception("NumuSkimmer") << "The output collection of tracks has "
300 // << trackOut.size() << " tracks, the input collection has"
301 // << trackIn.size() << " something is wrong.";
302 //
303 // // do a FindMany for the track to MichelECluster connection. Copy the found MichelECluster
304 // // into the output vector, then make the associations
305 // // apparently there can be a many to one or many to many association between
306 // // MichelEClusters and Tracks...so just pass through what was already decided
307 // art::FindMany<me::MichelECluster> fmme(trackIn, e, fMichelELabel);
308 //
309 // for(size_t t = 0; t < trackIn.size(); ++t){
310 // std::vector<const me::MichelECluster*> mevec;
311 // fmme.get(t, mevec);
312 //
313 // for(auto mec : mevec ){
314 // michelEOut.push_back( *mec );
315 // // set the parent track based on the current track being output
316 // art::ProductID tid = prod.getProductID< std::vector<rb::Track> >(e);
317 // art::Ptr<rb::Track> tptr(tid, t, e.productGetter(tid));
318 // michelEOut.back().SetParentTrack(tptr);
319 // util::CreateAssn(prod, e, trackOut, michelEOut, trkMECAssn, michelEOut.size()-1, michelEOut.size(), t);
320 // util::CreateAssn(prod, e, sliceOut, michelEOut, slcMECAssn, michelEOut.size()-1, michelEOut.size());
321 // }
322 // }
323 //
324 // return;
325 //}
326 
327 //------------------------------------------------------------------------------
329  art::EDProducer const& prod,
330  std::vector<art::Ptr<rb::Track> > const& trackIn,
331  std::vector<T> & tOut,
332  std::vector<rb::Track> & trackOut,
333  art::Assns<rb::Track, T> & trkTAssn,
334  std::string const& modLabel)
335 {
336  // this method requires the trackOut collection to have already been filled. All
337  // tracks from the slice are assumed to be copied into the skimmed slice and in the
338  // same order as the tracks from the original slice (ie trackIn)
339  // trackOut could be larger than track in, if we are in the ND so only look at the
340  // last trackIn.size() entries in trackOut
341 
342  // do a FindOne for the track to T connection. Copy the found T
343  // into the output vector, then make the associations
344  art::FindOne<T> fot(trackIn, e, modLabel);
345  for(size_t ti = 0; ti < trackIn.size(); ++ti){
346  cet::maybe_ref<T const> t(fot.at(ti));
347  if( t.isValid() ){
348  tOut.push_back( t.ref() );
349  util::CreateAssn(prod,
350  e,
351  trackOut,
352  tOut,
353  trkTAssn,
354  tOut.size()-1,
355  tOut.size(),
356  trackOut.size() - trackIn.size() + ti,
359  }
360  }
361 
362  return;
363 }
364 
365 
366 
367 
368 //------------------------------------------------------------------------------
370  art::EDProducer const& prod,
371  std::vector< art::Ptr<rb::Shower> > const& showerIn,
372  std::vector<slid::ShowerLID> & slidOut,
373  std::vector<rb::Cluster> & sliceOut,
374  std::vector<rb::Shower> & showerOut,
377 {
378 
379  // do a FindOne for the shower to ShowerLID connection. Copy the found ShowerLID into the
380  // output vector, then make the associations
381  art::FindOne<slid::ShowerLID> foslid(showerIn, e, fLIDLabel);
382 
383  // we may be calling this multiple times in an event because there are several slices
384  // that passed the selection. figure out where the showers for this slice start in
385  // the output vector as that is important for the creation of the slid to shower associations
386  size_t offset = showerOut.size() - showerIn.size();
387 
388  for(size_t s = 0; s < showerIn.size(); ++s){
390  if( slid.isValid() ){
391  slidOut.push_back( slid.ref() );
392  util::CreateAssn(prod,
393  e,
394  showerOut,
395  slidOut,
396  shwSLDAssn,
397  slidOut.size()-1,
398  slidOut.size(),
399  s + offset,
402  util::CreateAssn(prod,
403  e,
404  sliceOut,
405  slidOut,
406  slcSLDAssn,
407  slidOut.size()-1,
408  slidOut.size(),
409  UINT_MAX,
412  }
413  }
414 
415  return;
416 }
417 
418 //------------------------------------------------------------------------------
420 {
421  fVertexLabel = p.get<std::string>("VertexLabel", "elasticarmshs" );
422  fShowerLabel = p.get<std::string>("ShowerLabel", "recluster" );
423  fTrackLabel = p.get<std::string>("TrackLabel", "kalmantrackmerge" );
424  fCosmicLabel = p.get<std::string>("CosmicLabel", "cosmictrack" );
425  fCosRejLabel = p.get<std::string>("CosRejLabel", "cosrej" );
426  fNueCosRejLabel = p.get<std::string>("NueCosRejLabel", "nuecosrej" ); /// 2017
427  fLIDLabel = p.get<std::string>("LIDLabel", "slid" ); /// 2017
428  if( fInstanceLabel.find("2018") == std::string::npos ) // chek it is not 2018 Analysis
429  fCVNLabel = p.get<std::string>("CVNLabel", "cvneval" ); /// 2017
430  else
431  fCVNLabel = p.get<std::string>("CVNLabel", "cvnevalprod3train" ); /// 2018
432  fNumuSandLabel = p.get<std::string>("NumuSandLabel", "numusand" );
433  fVetoLabel = p.get<std::string>("VetoLabel", "veto" );
434  fQePIdLabel = p.get<std::string>("QePIdLabel", "qepid" );
435  fReMIdLabel = p.get<std::string>("ReMIdLabel", "remid" );
436  fMichelELabel = p.get<std::string>("MichelELabel", "michelekalmantrack");
437  fNumuELabel = p.get<std::string>("NumuELabel", "numue" );
438  fEnergyLabel = p.get<std::string>("EnergyLabel", "numue" );
439  fCAFLabel = p.get<std::string>("CAFLabel", "cafmaker" );
440  fGeneratorLabel = p.get<std::string>("GeneratorLabel", "generator" );
441  fFluxWeightLabel = p.get<std::string>("FluxWeightLabel", "ppfxcorrection" );
442 
443  fCosmicInstance = fInstanceLabel + "Cosmics";
444 
445 
446  auto prongTag = p.get<std::string>("ProngTag", "fuzzykvertex:Prong3D");
447  auto pos = prongTag.find(":");
448  fProngTag = art::InputTag(prongTag.substr(0, pos),
449  prongTag.substr(pos+1, prongTag.size()));
450 
451  return;
452 }
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)
std::string fNumuSandLabel
label of module creating NumuSand
Definition: NumuSkimmer.h:75
#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)
std::string fTrackLabel
label of module creating tracks
Definition: NumuSkimmer.h:72
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 fGeneratorLabel
label of module creating MC events
Definition: NumuSkimmer.h:82
art::InputTag fProngTag
input tag of module creating showers (2017)
Definition: NumuSkimmer.h:89
bool showerByEnergyNumu(art::Ptr< rb::Shower > s1, art::Ptr< rb::Shower > s2)
Definition: NumuSkimmer.cxx:35
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 fMichelELabel
label of module creating MichelEClusters
Definition: NumuSkimmer.h:80
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)
std::string fCosmicInstance
label for cosmic ray related products being made
Definition: NumuSkimmer.h:84
bool isRealData() const
Definition: Event.h:83
std::string fVertexLabel
label of module creating vertex
Definition: NumuSkimmer.h:69
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
bool prongByLengthNumu(art::Ptr< rb::Prong > p1, art::Ptr< rb::Prong > p2)
Definition: NumuSkimmer.cxx:41
std::string fCosmicLabel
label of module creating cosmic tracks
Definition: NumuSkimmer.h:73
object containing MC flux information
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
const XML_Char * s
Definition: expat.h:262
std::string fCosRejLabel
label of module creating CosRej
Definition: NumuSkimmer.h:74
virtual double TotalLength() const
Distance along prong to reach last cell hit.
Definition: Prong.cxx:186
std::string fVetoLabel
label of module creating vetos
Definition: NumuSkimmer.h:76
Result for CVN.
double CalorimetricEnergy(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple estimate of neutrino energy.
Definition: Cluster.cxx:439
void reconfigure(fhicl::ParameterSet const &p)
std::string fShowerLabel
label of module creating showers
Definition: NumuSkimmer.h:70
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fNueCosRejLabel
label of module creating NueCosRej (2017)
Definition: NumuSkimmer.h:86
void Skim(art::Event &e, art::EDProducer const &prod)
Definition: NumuSkimmer.cxx:57
std::string fReMIdLabel
label of module creating ReMIds
Definition: NumuSkimmer.h:78
std::string fQePIdLabel
label of module creating QePIds
Definition: NumuSkimmer.h:77
std::string fLIDLabel
label of module creating lids (2017)
Definition: NumuSkimmer.h:88
Vertex location in position and time.
T prod(const std::vector< T > &v)
Definition: prod.hpp:17
size_type size() const
Definition: PtrVector.h:308
std::string fEnergyLabel
label of module creating energy objects
Definition: NumuSkimmer.h:71
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
std::string fCVNLabel
label of module creating cvns (2017)
Definition: NumuSkimmer.h:87
std::string fCAFLabel
label of module creating StandardRecords
Definition: NumuSkimmer.h:81
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
std::string fFluxWeightLabel
label of module creating flux weights
Definition: NumuSkimmer.h:83
std::string fNumuELabel
label of module creating NumuEs
Definition: NumuSkimmer.h:79
void CopyTrackAssn(art::Event &e, art::EDProducer const &prod, std::vector< art::Ptr< rb::Track > > const &trackIn, std::vector< T > &tOut, std::vector< rb::Track > &trackOut, art::Assns< rb::Track, T > &trkTAssn, std::string const &modLabel)
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)
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:12
bool CopyTracks(art::EDProducer const &prod, art::Event &e, std::vector< art::Ptr< rb::Track > > const &trackIn, std::vector< rb::Track > &trackOut, std::vector< rb::Cluster > &sliceOut, art::Assns< rb::Cluster, rb::Track > &slcTrkAssn, std::string const &slcInstance="", std::string const &trkInstance="")
size_type get(size_type i, reference item, data_reference data) const
Definition: FindManyP.h:469
#define LOG_VERBATIM(category)
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)
Definition: fwd.h:28
NumuSkimmer(fhicl::ParameterSet const &p)
Definition: NumuSkimmer.cxx:48
bool failedToGet() const
Definition: Handle.h:196