24 #include "Utilities/AssociationUtil.h" 39 if (lhs.
Y() == rhs.
Y()) {
40 if (lhs.
Z() == rhs.
Z()) {
41 return lhs.
T() < rhs.
T();
43 else return lhs.
Z() < rhs.
Z();
45 else return lhs.
Y() < rhs.
Y();
48 bool pairHitComp (std::pair<rb::CellHit, rb::RecoHit> lhp,
49 std::pair<rb::CellHit, rb::RecoHit> rhp) {
98 produces<std::vector<upmuana::LlrUpmu> >();
99 produces< art::Assns<upmuana::LlrUpmu,rb::Track> >();
107 std::unique_ptr<std::vector<upmuana::LlrUpmu> > upmucol(
new std::vector<upmuana::LlrUpmu>);
113 for(
unsigned int i = 0;
i<slicecol->size();++
i){
123 for(
unsigned int iSlice = 0; iSlice<slicelist.
size(); ++iSlice){
125 const std::vector< art::Ptr<rb::Track> > slicetrks = fmt.at(iSlice);
126 for(
unsigned int i_track = 0;i_track<slicetrks.size(); ++i_track){
132 std::set< std::pair<rb::CellHit,rb::RecoHit>,
133 bool(*)(std::pair<rb::CellHit,rb::RecoHit>,
134 std::pair<rb::CellHit,rb::RecoHit>)>
137 for (
size_t i_hit=0; i_hit < trackHits.
size(); ++i_hit) {
146 tmp.
setLLR(sortedTrackHits);
147 upmucol->push_back(tmp);
151 e.
put(std::move(upmucol));
152 e.
put(std::move(assncol));
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.
void setLLR(std::set< std::pair< rb::CellHit, rb::RecoHit >, bool(*)(std::pair< rb::CellHit, rb::RecoHit >, std::pair< rb::CellHit, rb::RecoHit >)>)
void reconfigure(const fhicl::ParameterSet &p)
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
DEFINE_ART_MODULE(TestTMapFile)
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
ProductID put(std::unique_ptr< PROD > &&product)
UpMuProb(fhicl::ParameterSet const &p)
UpMuProb & operator=(UpMuProb const &)=delete
void push_back(Ptr< U > const &p)
bool recoHitComp(rb::RecoHit lhs, rb::RecoHit rhs)
T get(std::string const &key) const
rb::RecoHit RecoHit(const art::Ptr< rb::CellHit > &chit) const
Return calibrated hit based on assumed W coordinate.
bool IsCalibrated() const
You MUST check here before accessing PECorr, MIP or GeV.
reference at(size_type n)
bool pairHitComp(std::pair< rb::CellHit, rb::RecoHit > lhp, std::pair< rb::CellHit, rb::RecoHit > rhp)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void produce(art::Event &e) override