87 int counters_loaded=-1;
88 std::vector<std::vector<double> > countergeometry;
91 char counterfile[]=
"/afs/fnal.gov/files/home/room1/melnimr/lr_dev_7/srcs/dunetpc/dune/Geometry/muoncounters.txt";
100 std::map< int, const simb::MCParticle* > particleMap;
102 for (
auto const& particle : (*particleHandle) )
106 int fTrackID = particle.TrackId();
108 particleMap[fTrackID] = &particle;
117 size_t numberTrajectoryPoints = particle.NumberTrajectoryPoints();
120 int last = numberTrajectoryPoints - 1;
121 const TLorentzVector& positionStart = particle.Position(0);
122 const TLorentzVector& positionEnd = particle.Position(last);
123 const TLorentzVector& momentumStart = particle.Momentum(0);
124 const TLorentzVector& momentumEnd = particle.Momentum(last);
126 double x_increment = 0.;
127 double z_increment = 0.;
128 TVector3 trackStart(positionStart.X()+x_increment,positionStart.Y(),positionStart.Z()+z_increment);
131 std::vector< std::vector<double> > hitcounters;
136 countergeometry,hitcounters);
141 bool Layer_1_2 =
false;
142 bool Layer_3_4_5 =
false;
143 bool Layer_E =
false;
144 bool Layer_W =
false;
145 bool Layer_N_U =
false;
146 bool Layer_N_L =
false;
147 bool Layer_S_U =
false;
148 bool Layer_S_L =
false;
151 for(
unsigned int ii=0;ii<hitcounters.size();ii++)
155 std::cout<<
"::Filter, counters triggered are: "<<hitcounters[ii][0] <<
std::endl;
162 if( 40 <= hitcounters[ii][0] && hitcounters[ii][0] <= 61){
165 if( hitcounters[ii][0] > 61){
168 if (14 <= hitcounters[ii][0] && hitcounters[ii][0] <=19){
171 if ( 34 <= hitcounters[ii][0] && hitcounters[ii][0] <= 39){
174 if (8 <= hitcounters[ii][0] && hitcounters[ii][0] <= 13){
177 if (28 <= hitcounters[ii][0] && hitcounters[ii][0] <= 33){
180 if (hitcounters[ii][0] <= 7){
183 if (20 <= hitcounters[ii][0] && hitcounters[ii][0] <= 27){
189 if (Layer_1_2 && Layer_3_4_5){
192 if (Layer_N_U && Layer_S_L){
195 if (Layer_N_L && Layer_S_U){
198 if (Layer_E && Layer_W){
201 std::cout <<
"Trigger is ....." << Trigger <<
std::endl;
CFilter(fhicl::ParameterSet const &pset)
Declaration of signal hit object.
Definition of basic raw digits.
void reconfigure(fhicl::ParameterSet const &pset)
std::string fSimulationProducerLabel
static int loadMuonCounterGeometry(char *filename, std::vector< std::vector< double > > &geometry)
art framework interface to geometry description
virtual bool filter(art::Event &e)
#define DEFINE_ART_MODULE(klass)
Collect all the RawData header files together.
T get(std::string const &key) const
std::string fHitsModuleLabel
Declaration of cluster object.
Provides recob::Track data product.
Encapsulate the geometry of a wire.
Interface to algorithm class for DUNE 35t muon counters.
std::string fRawDigitLabel
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
EDFilter(fhicl::ParameterSet const &pset)
static int testTrackInAllCounters(int trackID, TVector3 trackpoint, TVector3 trackvector, std::vector< std::vector< double > > &geometry, std::vector< std::vector< double > > &hitcounters)
Declaration of basic channel signal object.
QTextStream & endl(QTextStream &s)
Event finding and building.
std::string fTrackModuleLabel