30 std::vector<unsigned int>
setA;
31 std::vector<unsigned int>
setB;
46 bool UsesCounterSet(
const std::vector<unsigned int> &counterIDs,
const std::set<unsigned int> &usedCounterIDs);
79 auto particles = e.
getHandle<std::vector<simb::MCParticle> >(
"largeant");
81 for (
unsigned int part_i = 0; part_i < particles->size(); part_i++){
89 std::set<unsigned int> usedExtCounterIDs;
93 for (
unsigned int pt = 0; pt < npts; pt++){
95 TLorentzVector pos4 = particle->
Position(pt);
105 usedExtCounterIDs.insert(counterID);
109 std::cout<<
"NCounters (any) passed through: " << usedExtCounterIDs.size() <<
std::endl;
136 for (
unsigned int i = 0; i < geom->
NAuxDets(); i++){
138 if (i >=6 && i <= 15) EWCounterSetPair.
setA.push_back(i);
139 else if (i >= 28 && i <=37) EWCounterSetPair.
setB.push_back(i);
141 else if (i >= 22 && i <= 27) NupSdownCounterSetPair.
setA.push_back(i);
142 else if (i <= 5) NupSdownCounterSetPair.
setB.push_back(i);
144 else if (i >= 16 && i <= 21) NdownSupCounterSetPair.
setA.push_back(i);
145 else if (i >= 38 && i <= 43) NdownSupCounterSetPair.
setB.push_back(i);
160 std::cout<<
"Counter set pair: "<<i<<
std::endl;
173 TLorentzVector mom4 = particle->
Momentum();
187 if (usesSetA && usesSetB){
188 std::cout<<
"USES BOTH SETS OF COUNTERS"<<
std::endl;
198 unsigned int usedCounterID = (*setIt);
200 for (
unsigned int i = 0; i < counterIDs.size(); i++){
202 if (usedCounterID == counterIDs[i]){
203 std::cout<<
"Counter ID match"<<
std::endl;
std::vector< unsigned int > setA
unsigned int NumberTrajectoryPoints() const
const TLorentzVector & Position(const int i=0) const
unsigned int FindAuxDetAtPosition(double const worldLoc[3], double tolerance=0) const
Returns the index of the auxiliary detector at specified location.
bool IsInterestingParticle(const art::Ptr< simb::MCParticle > particle)
Handle< PROD > getHandle(SelectorBase const &) const
double fParticleMaxEnergy
std::vector< int > fInterestingPDGs
LArG4ExtCounterFilter(fhicl::ParameterSet const &pset)
art framework interface to geometry description
void reconfigure(fhicl::ParameterSet const &pset)
virtual ~LArG4ExtCounterFilter()
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
std::vector< CounterSetPair > fCounterSetPairs
std::vector< unsigned int > setB
const TLorentzVector & Momentum(const int i=0) const
EDFilter(fhicl::ParameterSet const &pset)
Declaration of basic channel signal object.
bool fUseNupSdownCounterPair
bool UsesCounterSetPair(const CounterSetPair &CSP, const std::set< unsigned int > &usedCounterIDs)
bool fUseNdownSupCounterPair
bool UsesCounterSet(const std::vector< unsigned int > &counterIDs, const std::set< unsigned int > &usedCounterIDs)
virtual bool filter(art::Event &e)
QTextStream & endl(QTextStream &s)
unsigned int NAuxDets() const
Returns the number of auxiliary detectors.
double fParticleMinEnergy