24 #include "Utilities/AssociationUtil.h" 66 <<
"There are no numu CellHits for this event, don't try to skim anything.";
87 <<
" slices in this event";
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> );
99 std::unique_ptr< std::vector<rb::Shower> > showerOut (
new std::vector<rb::Shower> );
100 std::unique_ptr< std::vector<rb::Prong> > prongOut (
new std::vector<rb::Prong> );
101 std::unique_ptr< std::vector<rb::Vertex> > vertexOut (
new std::vector<rb::Vertex> );
102 std::unique_ptr< std::vector<slid::EventLID> > elidOut (
new std::vector<slid::EventLID> );
103 std::unique_ptr< std::vector<slid::ShowerLID> > slidOut (
new std::vector<slid::ShowerLID> );
104 std::unique_ptr< std::vector<cvn::Result> > cvnOut (
new std::vector<cvn::Result> );
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> );
149 for(
size_t s = 0;
s < slices.
size(); ++
s){
151 sliceNum = sliceNumHandle->at(
s);
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;
158 std::vector< art::Ptr<rb::Shower> > showers;
159 std::vector< art::Ptr<rb::Prong> > prongs;
160 std::vector< art::Ptr<rb::Vertex> > vertices;
161 std::vector< art::Ptr<cvn::Result> > cvns;
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;
167 fmt .
get(
s, tracks );
168 fmct .
get(
s, cosmics );
169 fmcr .
get(
s, cosrejs );
170 fmnuecr.
get(
s, nuecosrejs);
171 fms .
get(
s, showers );
172 fmp .
get(
s, prongs );
173 fmvx .
get(
s, vertices);
174 fmcvn.
get(
s, cvns );
175 fmns .
get(
s, sands );
176 fmv .
get(
s, vetos );
177 fmqe .
get(
s, qepids );
178 fme .
get(
s, numues );
192 su.
CopyVertex (prod, e, vertices[0], *vertexOut, *sliceOut, *slcVtxAssn);
193 su.
CopyProngs (prod, e, prongs, *prongOut, *sliceOut, *slcPrgAssn);
194 su.
CopyShowers(prod, e, showers, *showerOut, *sliceOut, *slcShwAssn);
196 su.
CopyTracks(prod, e, tracks, *trackOut, *sliceOut, *slcTrkAssn );
208 this->
CopyShowerLID(e, prod, showers, *slidOut, *sliceOut, *showerOut, *slcSLDAssn, *shwSLDAssn);
331 std::vector<T> & tOut,
332 std::vector<rb::Track> & trackOut,
345 for(
size_t ti = 0; ti < trackIn.size(); ++ti){
348 tOut.push_back(
t.ref() );
356 trackOut.size() - trackIn.size() + ti,
372 std::vector<slid::ShowerLID> & slidOut,
373 std::vector<rb::Cluster> & sliceOut,
374 std::vector<rb::Shower> & showerOut,
386 size_t offset = showerOut.size() - showerIn.size();
388 for(
size_t s = 0;
s < showerIn.size(); ++
s){
390 if(
slid.isValid() ){
391 slidOut.push_back(
slid.ref() );
446 auto prongTag = p.
get<
std::string>(
"ProngTag",
"fuzzykvertex:Prong3D");
447 auto pos = prongTag.find(
":");
449 prongTag.substr(pos+1, prongTag.size()));
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
#define LOG_DEBUG(stream)
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
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
art::InputTag fProngTag
input tag of module creating showers (2017)
bool showerByEnergyNumu(art::Ptr< rb::Shower > s1, art::Ptr< rb::Shower > s2)
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
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
std::string fVertexLabel
label of module creating vertex
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
Module to create a summary of total POT seen in a job.
bool prongByLengthNumu(art::Ptr< rb::Prong > p1, art::Ptr< rb::Prong > p2)
std::string fCosmicLabel
label of module creating cosmic tracks
object containing MC flux information
ProductID put(std::unique_ptr< PROD > &&product)
std::string fCosRejLabel
label of module creating CosRej
virtual double TotalLength() const
Distance along prong to reach last cell hit.
std::string fVetoLabel
label of module creating vetos
double CalorimetricEnergy(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple estimate of neutrino energy.
void reconfigure(fhicl::ParameterSet const &p)
std::string fShowerLabel
label of module creating showers
T get(std::string const &key) const
std::string fNueCosRejLabel
label of module creating NueCosRej (2017)
void Skim(art::Event &e, art::EDProducer const &prod)
std::string fReMIdLabel
label of module creating ReMIds
std::string fQePIdLabel
label of module creating QePIds
std::string fLIDLabel
label of module creating lids (2017)
Vertex location in position and time.
T prod(const std::vector< T > &v)
std::string fEnergyLabel
label of module creating energy objects
std::string fCVNLabel
label of module creating cvns (2017)
std::string fCAFLabel
label of module creating StandardRecords
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
std::string fFluxWeightLabel
label of module creating flux weights
std::string fNumuELabel
label of module creating NumuEs
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
Build slid::LID objects to store electron ID, if asked for, otherwise, calculate LID info and make av...
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
#define LOG_VERBATIM(category)
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)
NumuSkimmer(fhicl::ParameterSet const &p)