Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
airshower::AirSlicer Class Reference
Inheritance diagram for airshower::AirSlicer:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 AirSlicer (fhicl::ParameterSet const &pset)
 
virtual ~AirSlicer ()
 
void produce (art::Event &evt)
 
void beginJob ()
 
std::string workerType () const
 
void doBeginJob ()
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< TconsumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< TmayConsumeView (InputTag const &tag)
 

Protected Member Functions

bool GenerateCluster (unsigned int point, int ClID)
 
int CountActiveDCM (const std::vector< rb::CellHit > &hitlist)
 
std::vector< rb::ClusterTemporalClusters (std::vector< art::Ptr< rb::CellHit > > hitList)
 
void HoughRhoTheta (double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmaRho, double *sigmaTheta)
 
TH2D * GetHoughMap (rb::HitList hitList)
 
TH1D * GetHoughAngles (rb::HitList hitList)
 
TH1D * GetHoughRhos (rb::HitList hitList, double angle, double angleSig)
 
std::pair< double, double > GetHitPos (art::Ptr< rb::CellHit > hit)
 
void FindNeighbors (rb::Cluster clusterList, geo::View_t view)
 
std::vector< rb::ClusterMakeTrackSlices (rb::Cluster timeSlice, rb::Cluster &noiseCluster, geo::View_t view, bool &mapItrForward)
 
ConsumesCollector & consumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Protected Attributes

std::string fCellHitInput
 Read CellHits from this input. More...
 
unsigned int fMinPts
 minimum number of neighbors for a hit to be in a cluster More...
 
int fMaxSlices
 maximum number of time slices to create More...
 
int fMaxPeaks
 maximum number of rho peaks to count More...
 
bool fWriteTimeSlices
 save time slices to output file More...
 
std::string fTimeSliceInstance
 instance name of time slices More...
 
std::string fTrackSliceInstance
 instance name of track slices More...
 
int fTimeRangeLow
 low edge of time range for temporal slicing (integer microseconds) More...
 
int fTimeRangeHigh
 high edge of time range for temporal slicing (integer microseconds) More...
 
double fTimePeakCut
 cut for temporal slicing More...
 
double fTimePeakSig
 significance for temporal slice peak search More...
 
double fTimePeakThresh
 threshold for temporal slice peak search More...
 
double fRhoPeakSig
 significance for rho peak search More...
 
double fRhoPeakThresh
 threshold for rho peak search More...
 
double fSigCellSepX
 scale for X separation between cells in X-view to include in non-noise slice More...
 
double fSigCellSepY
 scale for Y separation between cells in Y-view to include in non-noise slice More...
 
double fSigCellSepZ
 scale for Z separation between cells to include in non-noise slice More...
 
double fMaxNeighborScore
 neighbor score cutoff More...
 
double fMaxHitSepX
 maximum X separation between hits along track slice in X-view More...
 
double fMaxHitSepY
 maximum Y separation between hits along track slice in Y-view More...
 
double fMaxHitSepZ
 maximum Z separation between hits along track slice More...
 
double fMinHoughPairs
 minimum number of hit pairs in maximum Hough angle or rho histogram to proceed More...
 
double fMinHoughHitSep
 minimum separation of hit pairs for Hough map More...
 
double fHoughRhoPeakThresh
 threshold for Hough map rho peak search More...
 
double fHoughExtrapPlanes
 number of planes required for Hough extrapolation More...
 
double fMaxHoughMatchVal
 maximum match value for Hough extrapolation More...
 
unsigned int fMinTrackHits
 minimum number of hits for a track slice More...
 
unsigned int fMinTracks
 minimum number of tracks in each time slice More...
 
double fChi2NdofCut
 cut on Chi2/Ndof for track fit More...
 
double fMinTrackLen
 minimum track length for good tracks More...
 
int fMaxSliceHits
 maximum number of hits to perform slicing More...
 
bool fSaveHists
 save intermediate histograms More...
 
std::string fRawDataLabel
 Data label for trigger prescale. More...
 
std::vector< std::vector< unsigned int > > fNeighborList
 
std::vector< intfClusterIDs
 
TSpectrum * fSpecAna
 
TSpectrum * fRhoSpecAna
 
TTree * tree
 
int run
 
int subrun
 
int evtNum
 
int evtTime
 
int prescale
 
int ndcm
 
int houghMultY
 
int trackMultY
 
int houghMultX
 
int trackMultX
 
double houghAngleY
 
double houghStDevY
 
double houghAngleX
 
double houghStDevX
 
int totalHits
 
int totalADC
 

Detailed Description

Definition at line 43 of file AirSlicer_module.cc.

Member Typedef Documentation

Definition at line 17 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 25 of file Producer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 18 of file EDProducer.h.

Constructor & Destructor Documentation

airshower::AirSlicer::AirSlicer ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 131 of file AirSlicer_module.cc.

References fMaxPeaks, fMaxSlices, fRhoPeakSig, fRhoSpecAna, fSpecAna, fTimePeakSig, fTimeSliceInstance, and fTrackSliceInstance.

131  :
132  EDProducer(pset),
133  fCellHitInput (pset.get<std::string >("CellHitInput") ),
134  fMinPts (pset.get<unsigned int>("MinPts") ),
135  fMaxSlices (pset.get<int >("MaxSlices") ),
136  fMaxPeaks (pset.get<int >("MaxPeaks") ),
137  fWriteTimeSlices (pset.get<bool >("WriteTimeSlices") ),
138  fTimeSliceInstance (pset.get<std::string >("TimeSliceInstance") ),
139  fTrackSliceInstance(pset.get<std::string >("TrackSliceInstance")),
140  fTimeRangeLow (pset.get<int >("TimeRangeLow") ),
141  fTimeRangeHigh (pset.get<int >("TimeRangeHigh") ),
142  fTimePeakCut (pset.get<double >("TimePeakCut") ),
143  fTimePeakSig (pset.get<double >("TimePeakSig") ),
144  fTimePeakThresh (pset.get<double >("TimePeakThresh") ),
145  fRhoPeakSig (pset.get<double >("RhoPeakSig") ),
146  fRhoPeakThresh (pset.get<double >("RhoPeakThresh") ),
147  fSigCellSepX (pset.get<double >("SigCellSepX") ),
148  fSigCellSepY (pset.get<double >("SigCellSepY") ),
149  fSigCellSepZ (pset.get<double >("SigCellSepZ") ),
150  fMaxNeighborScore (pset.get<double >("MaxNeighborScore") ),
151  fMaxHitSepX (pset.get<double >("MaxHitSepX") ),
152  fMaxHitSepY (pset.get<double >("MaxHitSepY") ),
153  fMaxHitSepZ (pset.get<double >("MaxHitSepZ") ),
154  fMinHoughPairs (pset.get<int >("MinHoughPairs") ),
155  fMinHoughHitSep (pset.get<double >("MinHoughHitSep") ),
156  fHoughExtrapPlanes (pset.get<int >("HoughExtrapPlanes") ),
157  fMaxHoughMatchVal (pset.get<double >("MaxHoughMatchVal") ),
158  fMinTrackHits (pset.get<unsigned int>("MinTrackHits") ),
159  fMinTracks (pset.get<unsigned int>("MinTracks") ),
160  fChi2NdofCut (pset.get<double >("Chi2NdofCut") ),
161  fMinTrackLen (pset.get<double >("MinTrackLen") ),
162  fMaxSliceHits (pset.get<int >("MaxSliceHits") ),
163  fSaveHists (pset.get<bool >("SaveHists") ),
164  fRawDataLabel (pset.get<std::string >("RawDataLabel") )
165  {
166  produces< std::vector<rb::Cluster> >(fTimeSliceInstance);
167  produces< std::vector<rb::Cluster> >(fTrackSliceInstance);
168 
169  //Spectrums for peak counting
170  fSpecAna = new TSpectrum(fMaxSlices,fTimePeakSig);
171  fRhoSpecAna = new TSpectrum(fMaxPeaks,fRhoPeakSig);
172  }
double fMaxHoughMatchVal
maximum match value for Hough extrapolation
double fMinHoughHitSep
minimum separation of hit pairs for Hough map
double fTimePeakThresh
threshold for temporal slice peak search
int fTimeRangeHigh
high edge of time range for temporal slicing (integer microseconds)
unsigned int fMinPts
minimum number of neighbors for a hit to be in a cluster
double fSigCellSepX
scale for X separation between cells in X-view to include in non-noise slice
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
double fTimePeakSig
significance for temporal slice peak search
double fMinTrackLen
minimum track length for good tracks
double fSigCellSepZ
scale for Z separation between cells to include in non-noise slice
int fTimeRangeLow
low edge of time range for temporal slicing (integer microseconds)
std::string fRawDataLabel
Data label for trigger prescale.
double fRhoPeakSig
significance for rho peak search
double fTimePeakCut
cut for temporal slicing
double fMinHoughPairs
minimum number of hit pairs in maximum Hough angle or rho histogram to proceed
std::string fCellHitInput
Read CellHits from this input.
double fChi2NdofCut
cut on Chi2/Ndof for track fit
double fHoughExtrapPlanes
number of planes required for Hough extrapolation
std::string fTrackSliceInstance
instance name of track slices
bool fSaveHists
save intermediate histograms
int fMaxSlices
maximum number of time slices to create
double fMaxNeighborScore
neighbor score cutoff
std::string fTimeSliceInstance
instance name of time slices
unsigned int fMinTrackHits
minimum number of hits for a track slice
unsigned int fMinTracks
minimum number of tracks in each time slice
double fMaxHitSepX
maximum X separation between hits along track slice in X-view
double fSigCellSepY
scale for Y separation between cells in Y-view to include in non-noise slice
double fRhoPeakThresh
threshold for rho peak search
double fMaxHitSepZ
maximum Z separation between hits along track slice
bool fWriteTimeSlices
save time slices to output file
double fMaxHitSepY
maximum Y separation between hits along track slice in Y-view
int fMaxPeaks
maximum number of rho peaks to count
int fMaxSliceHits
maximum number of hits to perform slicing
enum BeamMode string
airshower::AirSlicer::~AirSlicer ( )
virtual

Definition at line 175 of file AirSlicer_module.cc.

176  { }

Member Function Documentation

void airshower::AirSlicer::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 179 of file AirSlicer_module.cc.

References evtNum, evtTime, houghAngleX, houghAngleY, houghMultX, houghMultY, houghStDevX, houghStDevY, ndcm, prescale, subrun, totalADC, totalHits, trackMultX, trackMultY, and tree.

180  {
182 
183  // Create the tree branches
184  tree = tfs->make<TTree>("Tree","Tree of info");
185 
186  tree->Branch("run", &run, "run/I" );
187  tree->Branch("subrun", &subrun, "subrun/I" );
188  tree->Branch("evtNum", &evtNum, "evtNum/I" );
189  tree->Branch("eventTime", &evtTime, "eventTime/I" );
190  tree->Branch("ndcm", &ndcm, "ndcm/I" );
191  tree->Branch("prescale", &prescale, "prescale/I" );
192 
193  tree->Branch("houghMultY", &houghMultY, "houghMultY/I" );
194  tree->Branch("trackMultY", &trackMultY, "trackMultY/I" );
195 
196  tree->Branch("houghMultX", &houghMultX, "houghMultX/I" );
197  tree->Branch("trackMultX", &trackMultX, "trackMultX/I" );
198 
199  tree->Branch("houghAngleY",&houghAngleY,"houghAngleY/D");
200  tree->Branch("houghStDevY",&houghStDevY,"houghStDevY/D");
201  tree->Branch("houghAngleX",&houghAngleX,"houghAngleX/D");
202  tree->Branch("houghStDevX",&houghStDevX,"houghStDevX/D");
203 
204  tree->Branch("totalHits", &totalHits, "totalHits/I" );
205  tree->Branch("totalADC" , &totalADC , "totalADC/I" );
206  }
Definition: run.py:1
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 55 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumes(), T, and getGoodRuns4SAM::tag.

56  {
57  return collector_.consumes<T, BT>(tag);
58  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ProductToken< T > consumes(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ConsumesCollector& art::ModuleBase::consumesCollector ( )
protectedinherited
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 69 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesMany(), and T.

70  {
71  collector_.consumesMany<T, BT>();
72  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 62 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::consumesView(), T, and getGoodRuns4SAM::tag.

63  {
64  return collector_.consumesView<T, BT>(tag);
65  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > consumesView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
int airshower::AirSlicer::CountActiveDCM ( const std::vector< rb::CellHit > &  hitlist)
protected

Definition at line 438 of file AirSlicer_module.cc.

References febshutoff_auto::dcm, daqchannelmap::DAQChannelMap::getDCM(), daqchannelmap::DAQChannelMap::getDiBlock(), MECModelEnuComparisons::i, and calib::j.

Referenced by produce().

439  {
440  unsigned int ndeaddcms = 0;
441  unsigned int ndcmhits[14][12] = {{0}};
443 
444  for(const rb::CellHit& chit: hitlist){
445  const unsigned int db = cmap->getDiBlock(chit.DaqChannel());
446  const unsigned int dcm = cmap->getDCM(chit.DaqChannel());
447 
448  ndcmhits[db-1][dcm-1]++;
449  }
450 
451  for(unsigned int i = 0; i < 14; ++i)
452  for(unsigned int j = 0; j < 12; ++j)
453  if(ndcmhits[i][j]==0) ndeaddcms++;
454 
455  return 168-ndeaddcms;
456  }
const double j
Definition: BetheBloch.cxx:29
A rawdata::RawDigit with channel information decoded.
Definition: CellHit.h:27
cmap::CMap class source code
Definition: CMap.cxx:17
dcm_id_t getDCM(dchan daqchan) const
Decode the dcm ID from a dchan.
diblock_t getDiBlock(dchan daqchan) const
Decode the diblock ID from a dchan.
void art::detail::Producer::doBeginJob ( )
inherited
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
void art::detail::Producer::doEndJob ( )
inherited
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited
bool art::detail::Producer::doEvent ( EventPrincipal ep,
ModuleContext const &  mc,
std::atomic< std::size_t > &  counts_run,
std::atomic< std::size_t > &  counts_passed,
std::atomic< std::size_t > &  counts_failed 
)
inherited
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited
void airshower::AirSlicer::FindNeighbors ( rb::Cluster  clusterList,
geo::View_t  view 
)
protected

Definition at line 391 of file AirSlicer_module.cc.

References rb::Cluster::Cell(), fClusterIDs, fMaxNeighborScore, fNeighborList, fSigCellSepX, fSigCellSepY, fSigCellSepZ, GetHitPos(), MECModelEnuComparisons::i, calib::j, geo::kX, geo::kY, rb::Cluster::NCell(), cet::pow(), std::sqrt(), and rb::CellHit::View().

Referenced by MakeTrackSlices().

392  {
393  fClusterIDs.clear();
394  fNeighborList.clear();
395  fNeighborList.resize( slice.NCell() );
396 
397  double sigCellSepXY(0.);
398  if ( view == geo::kY ) sigCellSepXY = fSigCellSepY;
399  if ( view == geo::kX ) sigCellSepXY = fSigCellSepX;
400 
401  // First add each point to its own list (the DBSCAN algorithm needs this to work correctly.)
402  for ( unsigned int i = 0; i < slice.NCell(); ++i ) {
403  fClusterIDs.push_back(-1);
404  fNeighborList[i].push_back(i);
405  }
406 
407  // Use i+1 < NCell to protect against the case where NCell = 0
408  for ( unsigned int i = 0; i+1 < slice.NCell(); ++i ) {
409  art::Ptr<rb::CellHit> hitI = slice.Cell(i);
410 
411  std::pair<double,double> hitPosI = GetHitPos( hitI );
412  double XYI = hitPosI.first;
413  double ZI = hitPosI.second;
414 
415  for ( unsigned int j = i+1; j < slice.NCell(); ++j ) {
416  art::Ptr<rb::CellHit> hitJ = slice.Cell(j);
417  if ( hitI->View() != hitJ->View() ) continue;
418 
419  std::pair<double,double> hitPosJ = GetHitPos( hitJ );
420  double XYJ = hitPosJ.first;
421  double ZJ = hitPosJ.second;
422 
423  // use physical distance for neighbor score
424  double deltaR = sqrt( pow(XYI-XYJ,2)/pow(sigCellSepXY,2) + pow(ZI-ZJ,2)/pow(fSigCellSepZ,2) );
425 
426  double score = deltaR;
427 
428  if ( score <= fMaxNeighborScore ) {
429  // i and j are neighbors, so they go into each others' lists
430  fNeighborList[i].push_back(j);
431  fNeighborList[j].push_back(i);
432  }
433  }
434  }
435  }
double fSigCellSepX
scale for X separation between cells in X-view to include in non-noise slice
geo::View_t View() const
Definition: CellHit.h:41
T sqrt(T number)
Definition: d0nt_math.hpp:156
constexpr T pow(T x)
Definition: pow.h:72
Vertical planes which measure X.
Definition: PlaneGeo.h:28
std::pair< double, double > GetHitPos(art::Ptr< rb::CellHit > hit)
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
double fSigCellSepZ
scale for Z separation between cells to include in non-noise slice
const double j
Definition: BetheBloch.cxx:29
std::vector< int > fClusterIDs
std::vector< std::vector< unsigned int > > fNeighborList
double fMaxNeighborScore
neighbor score cutoff
double fSigCellSepY
scale for Y separation between cells in Y-view to include in non-noise slice
bool airshower::AirSlicer::GenerateCluster ( unsigned int  point,
int  ClID 
)
protected

Definition at line 870 of file AirSlicer_module.cc.

References DEFINE_ART_MODULE(), fClusterIDs, fMinPts, fNeighborList, and fillBadChanDBTables::result.

Referenced by MakeTrackSlices().

871  {
872  // In the original DBSCAN paper, this is the function they called
873  // "ExpandCluster." How this function works is most easily understood
874  // by reading that paper (don't worry, it is pretty short...)
875 
876  // Get the list of neighbors for 'point.'
877  std::vector<unsigned int> seeds = fNeighborList[point];
878 
879  // If 'point' is not a core point, label it as noise and return.
880  if(seeds.size() < fMinPts) {
881  fClusterIDs[point] = 0;
882  return false;
883  }
884  else {
885  // Assign 'point' and the neighbors of 'point' to the cluster ClID.
886  for(unsigned int seedi = 0; seedi < seeds.size(); ++seedi)
887  fClusterIDs[point] = ClID;
888  seeds.erase(seeds.begin());
889 
890  // Loop over the neighbors of 'point' to see if they are also core
891  // points.
892  while(seeds.size() > 0) {
893  // Get the list of neighbors for the first seed point.
894  std::vector<unsigned int> result = fNeighborList[seeds[0]];
895 
896  // If the first seed point is also a core point, add its neighbors
897  // to the list of seeds and assigne them to the cluster ClID.
898  if(result.size() >= fMinPts) {
899  for(unsigned int resulti = 0; resulti < result.size(); ++resulti) {
900  // If the point is unassigned (-1) or previously labeled as
901  // noise (0), asign it ClID.
902  if(fClusterIDs[result[resulti]] == -1 ||
903  fClusterIDs[result[resulti]] == 0) {
904  // Only add this point to the list of seeds if it was
905  // previously unassigned.
906  if(fClusterIDs[result[resulti]] == -1)
907  seeds.push_back(result[resulti]);
908  fClusterIDs[result[resulti]] = ClID;
909  } // end if(resulti is -1 or 0)
910 
911  } // end for resulti
912 
913  } // end if result.size() >= fMinPts
914  seeds.erase(seeds.begin());
915 
916  } // end while
917  return true;
918  } // end else
919 
920  } // end GenerateCluster function
unsigned int fMinPts
minimum number of neighbors for a hit to be in a cluster
std::vector< int > fClusterIDs
std::vector< std::vector< unsigned int > > fNeighborList
std::array<std::vector<ProductInfo>, NumBranchTypes> const& art::ModuleBase::getConsumables ( ) const
inherited
std::pair< double, double > airshower::AirSlicer::GetHitPos ( art::Ptr< rb::CellHit hit)
protected

Definition at line 371 of file AirSlicer_module.cc.

References getBrightness::cell, rb::CellHit::Cell(), geo::PlaneGeo::Cell(), geo::CellGeo::GetCenter(), geo::kX, geo::kY, make_pair(), rb::CellHit::Plane(), geo::GeometryBase::Plane(), NDAPDHVSetting::plane, geo::PlaneGeo::View(), and test::z.

Referenced by FindNeighbors(), MakeTrackSlices(), and TemporalClusters().

372  {
374 
375  unsigned int plane = hit->Plane();
376  unsigned int cell = hit->Cell();
377  const geo::PlaneGeo* thePlane = geoSvc->Plane(plane);
378  const geo::CellGeo* theCell = thePlane->Cell(cell);
379 
380  double xyz[3];
381  theCell->GetCenter(xyz);
382  double xy(0.);
383  if ( thePlane->View() == geo::kX ) xy = xyz[0];
384  if ( thePlane->View() == geo::kY ) xy = xyz[1];
385  double z = xyz[2];
386 
387  return std::make_pair(xy,z);
388  }
void GetCenter(double *xyz, double localz=0.0) const
Definition: CellGeo.cxx:159
unsigned short Plane() const
Definition: CellHit.h:39
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
Vertical planes which measure X.
Definition: PlaneGeo.h:28
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
unsigned short Cell() const
Definition: CellHit.h:40
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
Geometry information for a single readout plane.
Definition: PlaneGeo.h:36
z
Definition: test.py:28
Encapsulate the cell geometry.
Definition: CellGeo.h:25
TH1D * airshower::AirSlicer::GetHoughAngles ( rb::HitList  hitList)
protected

Definition at line 325 of file AirSlicer_module.cc.

References geo::GeometryBase::DetHalfWidth(), fMinHoughHitSep, HoughRhoTheta(), MECModelEnuComparisons::i, calib::j, M_PI, cet::pow(), std::sqrt(), and chisquared::theta.

Referenced by MakeTrackSlices().

326  {
328  TH1D *angleHist = new TH1D("HoughAngleHist",";Angle [rad];Hit Pairs",200,-M_PI/2.,M_PI/2.);
329 
330  for ( unsigned int i = 0; i < hitList.size(); ++i ) {
331  for ( unsigned int j = i+1; j < hitList.size(); ++j ) {
332  if ( hitList[j].fView != hitList[i].fView ) continue;
333  double hitSep = sqrt( pow(hitList[i].fZ-hitList[j].fZ,2) + pow(hitList[i].fXY-hitList[j].fXY,2) );
334  if ( hitSep > geoSvc->DetHalfWidth() ) continue;
335  if ( hitSep < fMinHoughHitSep ) continue;
336  double rho, theta, sigmaRho, sigmaTheta;
337  HoughRhoTheta( hitList[i].fZ, hitList[i].fXY,
338  hitList[j].fZ, hitList[j].fXY,
339  &rho, &theta,
340  &sigmaRho, &sigmaTheta );
341  angleHist->Fill(theta);
342  }
343  }
344  return angleHist;
345  }
double fMinHoughHitSep
minimum separation of hit pairs for Hough map
T sqrt(T number)
Definition: d0nt_math.hpp:156
constexpr T pow(T x)
Definition: pow.h:72
#define M_PI
Definition: SbMath.h:34
void HoughRhoTheta(double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmaRho, double *sigmaTheta)
const double j
Definition: BetheBloch.cxx:29
double DetHalfWidth() const
TH2D * airshower::AirSlicer::GetHoughMap ( rb::HitList  hitList)
protected

Definition at line 303 of file AirSlicer_module.cc.

References geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), fMinHoughHitSep, HoughRhoTheta(), MECModelEnuComparisons::i, calib::j, M_PI, geo::GeometryBase::NPlanes(), cet::pow(), std::sqrt(), and chisquared::theta.

Referenced by MakeTrackSlices().

304  {
306  TH2D *mapHist = new TH2D("HoughMap",";Rho [cm];Angle [rad]",geoSvc->NPlanes()*4,-1.5*geoSvc->DetLength(),2.5*geoSvc->DetLength(),100,-M_PI/2.,M_PI/2.);
307  for ( unsigned int i = 0; i < hitList.size(); ++i ) {
308  for ( unsigned int j = i+1; j < hitList.size(); ++j ) {
309  if ( hitList[j].fView != hitList[i].fView ) continue;
310  double hitSep = sqrt( pow(hitList[i].fZ-hitList[j].fZ,2) + pow(hitList[i].fXY-hitList[j].fXY,2) );
311  if ( hitSep > geoSvc->DetHalfWidth() ) continue;
312  if ( hitSep < fMinHoughHitSep ) continue;
313  double rho, theta, sigmaRho, sigmaTheta;
314  HoughRhoTheta( hitList[i].fZ, hitList[i].fXY,
315  hitList[j].fZ, hitList[j].fXY,
316  &rho, &theta,
317  &sigmaRho, &sigmaTheta );
318  mapHist->Fill(rho,theta);
319  }
320  }
321  return mapHist;
322  }
double fMinHoughHitSep
minimum separation of hit pairs for Hough map
T sqrt(T number)
Definition: d0nt_math.hpp:156
constexpr T pow(T x)
Definition: pow.h:72
double DetLength() const
#define M_PI
Definition: SbMath.h:34
void HoughRhoTheta(double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmaRho, double *sigmaTheta)
const double j
Definition: BetheBloch.cxx:29
double DetHalfWidth() const
unsigned int NPlanes() const
TH1D * airshower::AirSlicer::GetHoughRhos ( rb::HitList  hitList,
double  angle,
double  angleSig 
)
protected

Definition at line 348 of file AirSlicer_module.cc.

References geo::GeometryBase::DetHalfWidth(), geo::GeometryBase::DetLength(), fMinHoughHitSep, HoughRhoTheta(), MECModelEnuComparisons::i, calib::j, geo::GeometryBase::NPlanes(), cet::pow(), std::sqrt(), and chisquared::theta.

Referenced by MakeTrackSlices().

349  {
351  TH1D *rhoHist = new TH1D("HoughRhoHist",";Rho [cm];Hit Pairs",geoSvc->NPlanes()*3,-0.25*geoSvc->DetLength(),1.25*geoSvc->DetLength());
352  for ( unsigned int i = 0; i < hitList.size(); ++i ) {
353  for ( unsigned int j = i+1; j < hitList.size(); ++j ) {
354  if ( hitList[j].fView != hitList[i].fView ) continue;
355  double hitSep = sqrt( pow(hitList[i].fZ-hitList[j].fZ,2) + pow(hitList[i].fXY-hitList[j].fXY,2) );
356  if ( hitSep > geoSvc->DetHalfWidth() ) continue;
357  if ( hitSep < fMinHoughHitSep ) continue;
358  double rho, theta, sigmaRho, sigmaTheta;
359  HoughRhoTheta( hitList[i].fZ, hitList[i].fXY,
360  hitList[j].fZ, hitList[j].fXY,
361  &rho, &theta,
362  &sigmaRho, &sigmaTheta );
363  if ( fabs( theta - angle ) / angleSig > 2. ) continue;
364  rhoHist->Fill(rho);
365  }
366  }
367  return rhoHist;
368  }
double fMinHoughHitSep
minimum separation of hit pairs for Hough map
Double_t angle
Definition: plot.C:86
T sqrt(T number)
Definition: d0nt_math.hpp:156
constexpr T pow(T x)
Definition: pow.h:72
double DetLength() const
void HoughRhoTheta(double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmaRho, double *sigmaTheta)
const double j
Definition: BetheBloch.cxx:29
double DetHalfWidth() const
unsigned int NPlanes() const
void airshower::AirSlicer::HoughRhoTheta ( double  x1,
double  y1,
double  x2,
double  y2,
double *  rho,
double *  theta,
double *  sigmaRho,
double *  sigmaTheta 
)
protected

Definition at line 276 of file AirSlicer_module.cc.

References std::atan2(), std::cos(), d, M_PI, cet::pow(), std::sin(), std::sqrt(), submit_syst::x2, and submit_syst::y2.

Referenced by GetHoughAngles(), GetHoughMap(), GetHoughRhos(), and MakeTrackSlices().

280  {
281  // Modified from MultiHough/MultiHough2P.cxx
282  *theta = atan2(x1-x2,y2-y1); // angle w.r.t. vertical
283  *rho = 0.5*(cos(*theta)*(x1+x2)+sin(*theta)*(y1+y2));
284  //
285  // Keep rho and theta within range [-pi/2,pi/2) (-R,+R)
286  //
287  while (*theta < -M_PI/2.) {
288  *theta += M_PI;
289  *rho = -(*rho);
290  }
291  while (*theta >= M_PI/2.) {
292  *theta -= M_PI;
293  *rho = -(*rho);
294  }
295 
296  // Compute the error estimates
297  double d = sqrt(pow(x2-x1,2)+pow(y2-y1,2));
298  *sigmarho = 3.0/sqrt(12.);
299  *sigmatheta = M_SQRT2*(3.0/sqrt(12.))/d;
300  }
Float_t y1[n_points_granero]
Definition: compare.C:5
Float_t x1[n_points_granero]
Definition: compare.C:5
T sqrt(T number)
Definition: d0nt_math.hpp:156
constexpr T pow(T x)
Definition: pow.h:72
#define M_PI
Definition: SbMath.h:34
Float_t d
Definition: plot.C:236
T sin(T number)
Definition: d0nt_math.hpp:132
T cos(T number)
Definition: d0nt_math.hpp:78
T atan2(T number)
Definition: d0nt_math.hpp:72
std::vector< rb::Cluster > airshower::AirSlicer::MakeTrackSlices ( rb::Cluster  timeSlice,
rb::Cluster noiseCluster,
geo::View_t  view,
bool &  mapItrForward 
)
protected

Definition at line 607 of file AirSlicer_module.cc.

References abs(), rb::Cluster::Add(), rb::Cluster::AllCells(), plot_validation_datamc::c, evtNum, fClusterIDs, fHoughExtrapPlanes, FindNeighbors(), fMaxHitSepX, fMaxHitSepY, fMaxHitSepZ, fMaxHoughMatchVal, fMinHoughPairs, fMinTrackHits, fMinTracks, genie::utils::style::Format(), fRhoPeakSig, fRhoPeakThresh, fRhoSpecAna, fSaveHists, GenerateCluster(), GetHitPos(), GetHoughAngles(), GetHoughMap(), GetHoughRhos(), houghAngleX, houghAngleY, houghMultX, houghMultY, HoughRhoTheta(), houghStDevX, houghStDevY, MECModelEnuComparisons::i, makeTrainCVSamples::int, rb::Cluster::IsNoise(), calib::j, geo::kX, geo::kY, M_PI, makeBrightnessMap::maxPlane, std::min(), rb::Cluster::NCell(), NDAPDHVSetting::plane, run, gen_hdf5record::size, std::sqrt(), string, subrun, trackMultX, trackMultY, and POTSpillRate::view.

Referenced by produce().

608  {
609  std::vector<rb::Cluster> trackSlices;
610  std::vector<rb::Cluster> finalTrackSlices;
611  if ( timeSlice.IsNoise() ) return trackSlices;
612 
614 
616 
617  double maxHitSepXY(0.);
618  if ( view == geo::kY ) maxHitSepXY = fMaxHitSepY;
619  if ( view == geo::kX ) maxHitSepXY = fMaxHitSepX;
620 
621  rb::HitList thisHitList( timeSlice );
622 
623  // Generate angular Hough map for entire slice
624  std::string viewName("XY");
625  if ( view == geo::kY ) viewName = std::string("Y");
626  if ( view == geo::kX ) viewName = std::string("X");
627 
628  if ( fSaveHists ) {
629  TH2D *mapHist = GetHoughMap( thisHitList );
630  mapHist->SetName(TString::Format("HoughMap_%s_%i_%i_%i",viewName.c_str(),run,subrun,evtNum));
631  tfs->make<TH2D>(*mapHist);
632  delete mapHist;
633  }
634  TH1D *angleHist = GetHoughAngles( thisHitList );
635 
636  angleHist->SetName(TString::Format("HoughAngleHist_%s_%i_%i_%i",viewName.c_str(),run,subrun,evtNum));
637  if ( fSaveHists ) tfs->make<TH1D>(*angleHist);
638  int maxBin = angleHist->GetMaximumBin();
639  if ( angleHist->GetBinContent(maxBin) < fMinHoughPairs ){
640  delete angleHist;
641  return trackSlices; // require minimum number of contributing cell pairs
642  }
643 
644  TF1 *agaus=new TF1("agaus","gaus",angleHist->GetBinCenter(maxBin-5),angleHist->GetBinCenter(maxBin+5));
645  agaus->SetParameter(0,angleHist->GetBinContent(maxBin));
646  agaus->SetParameter(1,angleHist->GetBinCenter(maxBin));
647  agaus->SetParameter(2,.01);
648  agaus->SetParLimits(1,angleHist->GetBinCenter(maxBin-1),angleHist->GetBinCenter(maxBin+1));
649  TFitResultPtr fitResult = angleHist->Fit("agaus","QSNB","",angleHist->GetBinCenter(maxBin-10),angleHist->GetBinCenter(maxBin+10));
650  int fitStatus = fitResult;
651 
652  if ( fitStatus != 0 ){
653  delete agaus;
654  delete angleHist;
655  return trackSlices; // Failed to find maximum Hough angle! Do something?
656  }
657 
658  double maxAngle = fitResult->Parameter(1);
659  double sigAngle = fitResult->Parameter(2);
660  sigAngle=sqrt(sigAngle*sigAngle);
661  delete agaus;
662  delete angleHist;
663 
664  // Generate rho Hough map for entire slice
665  TH1D *rhoHist = GetHoughRhos( thisHitList, maxAngle, sigAngle );
666  rhoHist->SetName(TString::Format("HoughRhoHist_%s_%i_%i_%i",viewName.c_str(),run,subrun,evtNum));
667  if ( fSaveHists ) tfs->make<TH1D>(*rhoHist);
668  int mult=fRhoSpecAna->Search( rhoHist, fRhoPeakSig, "goff nodraw", fRhoPeakThresh );
669 
670  // fill the tree variables for the appropriate view
671  if(view==geo::kY){
672  houghMultY=mult;
673  houghAngleY=maxAngle;
674  houghStDevY=sigAngle;
675  }
676  if(view==geo::kX){
677  houghMultX=mult;
678  houghAngleX=maxAngle;
679  houghStDevX=sigAngle;
680  }
681  delete rhoHist;
682 
683  // Group hits by plane
684  std::map< int, rb::Cluster > hitsByPlane;
685  for ( unsigned int hitItr = 0; hitItr < timeSlice.NCell(); ++hitItr ) {
686  if ( timeSlice.AllCells()[hitItr]->View() != view ) continue; // just to check
687  int plane = timeSlice.AllCells()[hitItr]->Plane();
688  if ( hitsByPlane.find(plane) == hitsByPlane.end() ) hitsByPlane[plane] = rb::Cluster(view);
689  hitsByPlane[plane].Add( timeSlice.AllCells()[hitItr] );
690  }
691 
692  // Loop through plane groupings
693  std::map< int, std::vector<rb::Cluster> > inPlaneClusters;
694  for ( auto planeItr = hitsByPlane.begin(); planeItr != hitsByPlane.end(); ++planeItr ) {
695  int thePlane = planeItr->first;
696  // Cluster hits in this plane
697  int CurrentClusterID = 1;
698  FindNeighbors( planeItr->second, view );
699  for ( unsigned int j = 0; j < planeItr->second.NCell(); ++j ) {
700  // if this cell isn't classified, attempt to expand the cluster
701  if ( fClusterIDs[j] == -1 ) {
702  if ( GenerateCluster( j, CurrentClusterID ) ) CurrentClusterID++;
703  }
704  }
705  // Group hits by cluster in this plane
706  inPlaneClusters[thePlane].resize(CurrentClusterID,rb::Cluster(view));
707  for ( unsigned int j = 0; j < planeItr->second.NCell(); ++j ) {
708  if ( fClusterIDs[j] == 0 ) {
709  noiseCluster.Add( planeItr->second.AllCells()[j] );
710  continue;
711  }
712  inPlaneClusters[thePlane][fClusterIDs[j]].Add( planeItr->second.AllCells()[j] );
713  }
714  } // Now inPlaneClusters contains clusters within each plane.
715 
716  // Loop through planes in this temporal slice
717  if ( view == geo::kY ) mapItrForward = (maxAngle > 0.);
718  // pick the direction for the X- and Y-views from this slice's Y-view, then pass it back for the X-view call
719  auto mapItrStart = inPlaneClusters.begin();
720  auto mapItrEnd = inPlaneClusters.end();
721  if ( !mapItrForward ) {
722  mapItrStart = --(inPlaneClusters.rbegin().base());
723  mapItrEnd = --(inPlaneClusters.rend().base());
724  }
725 
726  // Create first clusters from first plane
727  for ( unsigned int clusItr = 0; clusItr < mapItrStart->second.size(); ++clusItr ) {
728  trackSlices.push_back( mapItrStart->second[clusItr] );
729  }
730 
731  // Loop through remaining planes
732  auto mapItr = mapItrStart;
733  if ( mapItrForward ) ++mapItr;
734  else --mapItr;
735  while ( mapItr != mapItrEnd ) {
736  if ( mapItr->second.size() == 0 ) { // continue
737  if ( mapItrForward ) ++mapItr;
738  else --mapItr;
739  continue;
740  }
741  int thisPlane = mapItr->first;
742 
743  // Match each cluster in this plane with the best seed cluster
744  std::vector<int> bestMatchInt(inPlaneClusters[thisPlane].size(),-1);
745  std::vector<double> bestMatchVal(inPlaneClusters[thisPlane].size(),100000.);
746  for ( unsigned int j = 1; j < mapItr->second.size(); ++j ) { // cluster 0 is noise
747  if ( mapItr->second[j].NCell() == 0 ) continue;
748  // Find mean position of this cluster in this plane
749  double meanXY(0.);
750  double meanZ(0.);
751  for ( unsigned int c = 0; c < mapItr->second[j].NCell(); ++c ) {
752  art::Ptr<rb::CellHit> hit = mapItr->second[j].Cell(c);
753  std::pair<double,double> hitPos = GetHitPos( hit );
754  meanXY += hitPos.first;
755  meanZ += hitPos.second;
756  }
757  meanXY = meanXY / double(mapItr->second[j].NCell());
758  meanZ = meanZ / double(mapItr->second[j].NCell());
759 
760  // Loop through track clusters
761  for ( unsigned int i = 0; i < trackSlices.size(); ++i ) {
762  // Loop through hits in this track slice that are within the last few planes
763  std::map< int, std::pair<double,double> > trackSliceClusterPositions;
764  std::map< int, int > trackSliceClusterCounts;
765  double meanXYC(0.), meanZC(0.);
766  int nCells(0), maxPlane(0), minPlane(9999);
767  for ( unsigned int c = 0; c < trackSlices[i].NCell(); ++c ) {
768  if ( abs( int(trackSlices[i].Cell(c)->Plane()) - int(thisPlane) ) > 10 ) continue;
769  if ( trackSlices[i].Cell(c)->Plane() > maxPlane ) maxPlane = trackSlices[i].Cell(c)->Plane();
770  if ( trackSlices[i].Cell(c)->Plane() < minPlane ) minPlane = trackSlices[i].Cell(c)->Plane();
771  std::pair<double,double> hitPosC = GetHitPos( trackSlices[i].Cell(c) );
772  trackSliceClusterPositions[int(trackSlices[i].Cell(c)->Plane())].first += hitPosC.first;
773  trackSliceClusterPositions[int(trackSlices[i].Cell(c)->Plane())].second += hitPosC.second;
774  trackSliceClusterCounts[int(trackSlices[i].Cell(c)->Plane())]++;
775  meanXYC += hitPosC.first;
776  meanZC += hitPosC.second;
777  nCells++;
778  }
779  auto posItr = trackSliceClusterPositions.begin();
780  auto countItr = trackSliceClusterCounts.begin();
781  for ( unsigned int c = 0; c < trackSliceClusterPositions.size(); ++c ) {
782  posItr->second.first = posItr->second.first / countItr->second;
783  posItr->second.second = posItr->second.second / countItr->second;
784  posItr++;
785  countItr++;
786  }
787  if ( nCells == 0 ) {
788  continue;
789  }
790  meanXYC = meanXYC / double( nCells );
791  meanZC = meanZC / double( nCells );
792  int nPlanes = maxPlane-minPlane+1;
793  double closestClusterDistXY(1000000.);
794  double closestClusterDistZ(1000000.);
795  double meanHoughAngle(0.), meanHoughAngleSig(0.);
796  double meanHoughRho(0.), meanHoughRhoSig(0.);
797  int nMeanEntries(0);
798  for ( auto c = trackSliceClusterPositions.begin(); c != trackSliceClusterPositions.end(); ++c ) {
799  double deltaXY = fabs(c->second.first-meanXY);
800  double deltaZ = fabs(c->second.second-meanZ);
801  if ( deltaXY < closestClusterDistXY ) closestClusterDistXY = deltaXY;
802  if ( deltaZ < closestClusterDistZ ) closestClusterDistZ = deltaZ;
803  double houghRho, houghAngle, houghRhoSig, houghAngleSig;
804  HoughRhoTheta( c->second.second, c->second.first,
805  meanZ, meanXY,
806  &houghRho, &houghAngle, &houghRhoSig, &houghAngleSig );
807  meanHoughAngle += houghAngle;
808  meanHoughRho += houghRho;
809  meanHoughAngleSig += houghAngleSig*houghAngleSig;
810  meanHoughRhoSig += houghAngleSig*houghRhoSig;
811  nMeanEntries++;
812  }
813  if ( closestClusterDistXY > maxHitSepXY || closestClusterDistZ > fMaxHitSepZ ) {
814  continue;
815  }
816  meanHoughAngle = meanHoughAngle / double(nMeanEntries); // should already have excluded nMeanEntries == 0
817  meanHoughRho = meanHoughRho / double(nMeanEntries);
818  meanHoughAngleSig = sqrt(meanHoughAngleSig) / double(nMeanEntries);
819  meanHoughRhoSig = sqrt(meanHoughRhoSig) / double(nMeanEntries);
820  double matchVal;
821  if ( nPlanes <= 2*fHoughExtrapPlanes ) {
822  // Compare Hough angle between mean track slice cluster position and this cluster's position
823  // to the Hough angle of the time slice
824  double houghRho, houghAngle, houghRhoSig, houghAngleSig;
825  HoughRhoTheta( meanZ, meanXY, meanZC, meanXYC, &houghRho, &houghAngle, &houghRhoSig, &houghAngleSig );
826  matchVal = std::min(fabs(houghAngle-maxAngle),M_PI-fabs(houghAngle-maxAngle))/sigAngle;
827  } else {
828  // Compare mean Hough angle between all clusters in the track slice and this cluster's position
829  // to the Hough angle of the time slice
830  matchVal = std::min(fabs(meanHoughAngle-maxAngle),M_PI-fabs(meanHoughAngle-maxAngle))/sigAngle;
831  }
832  if ( matchVal > fMaxHoughMatchVal ) continue;
833  if ( matchVal < bestMatchVal[j] ) {
834  bestMatchInt[j] = i;
835  bestMatchVal[j] = matchVal;
836  }
837  }
838  }
839  for ( unsigned int j = 1; j < mapItr->second.size(); ++j ) { // cluster 0 is noise
840  // If no match found, add this cluster as a new seed
841  if ( bestMatchInt[j] < 0 ) {
842  trackSlices.push_back( mapItr->second[j] );
843  continue;
844  }
845  // Otherwise add the hits from this cluster to the best-matched track cluster
846  for ( unsigned int k = 0; k < mapItr->second[j].NCell(); ++k ) {
847  trackSlices[bestMatchInt[j]].Add( mapItr->second[j].AllCells()[k] );
848  }
849  }
850  if ( mapItrForward ) ++mapItr;
851  else --mapItr;
852  }
853 
854  for ( unsigned int i = 0; i < trackSlices.size(); ++i ) {
855  if ( trackSlices[i].NCell() < fMinTrackHits ) {
856  for ( unsigned int j = 0; j < trackSlices[i].NCell(); ++j ) {
857  noiseCluster.Add( trackSlices[i].AllCells()[j] );
858  }
859  } else {
860  finalTrackSlices.push_back( trackSlices[i] );
861  }
862  }
863  if ( finalTrackSlices.size() < fMinTracks ) finalTrackSlices.clear();
864  if(view==geo::kY) trackMultY=finalTrackSlices.size();
865  if(view==geo::kX) trackMultX=finalTrackSlices.size();
866  return finalTrackSlices;
867  }
double fMaxHoughMatchVal
maximum match value for Hough extrapolation
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
Definition: Cluster.cxx:134
T sqrt(T number)
Definition: d0nt_math.hpp:156
Vertical planes which measure X.
Definition: PlaneGeo.h:28
std::pair< double, double > GetHitPos(art::Ptr< rb::CellHit > hit)
A collection of associated CellHits.
Definition: Cluster.h:47
void abs(TH1 *hist)
#define M_PI
Definition: SbMath.h:34
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
Definition: Cluster.cxx:180
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
Definition: Cluster.cxx:84
Just the essential information required for track fitting.
Definition: HitList.h:40
double fRhoPeakSig
significance for rho peak search
TH1D * GetHoughAngles(rb::HitList hitList)
void HoughRhoTheta(double x1, double y1, double x2, double y2, double *rho, double *theta, double *sigmaRho, double *sigmaTheta)
const double j
Definition: BetheBloch.cxx:29
double fMinHoughPairs
minimum number of hit pairs in maximum Hough angle or rho histogram to proceed
std::vector< int > fClusterIDs
double fHoughExtrapPlanes
number of planes required for Hough extrapolation
bool fSaveHists
save intermediate histograms
Definition: structs.h:12
unsigned int fMinTrackHits
minimum number of hits for a track slice
bool GenerateCluster(unsigned int point, int ClID)
unsigned int fMinTracks
minimum number of tracks in each time slice
double fMaxHitSepX
maximum X separation between hits along track slice in X-view
void FindNeighbors(rb::Cluster clusterList, geo::View_t view)
double fRhoPeakThresh
threshold for rho peak search
double fMaxHitSepZ
maximum Z separation between hits along track slice
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
Definition: Style.cxx:154
T min(const caf::Proxy< T > &a, T b)
bool IsNoise() const
Is the noise flag set?
Definition: Cluster.h:163
double fMaxHitSepY
maximum Y separation between hits along track slice in Y-view
TH1D * GetHoughRhos(rb::HitList hitList, double angle, double angleSig)
TH2D * GetHoughMap(rb::HitList hitList)
enum BeamMode string
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 76 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsume(), T, and getGoodRuns4SAM::tag.

77  {
78  return collector_.mayConsume<T, BT>(tag);
79  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 90 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeMany(), and T.

91  {
93  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
double T
Definition: Xdiff_gwt.C:5
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 83 of file ModuleBase.h.

References art::ModuleBase::collector_, art::ConsumesCollector::mayConsumeView(), T, and getGoodRuns4SAM::tag.

84  {
85  return collector_.mayConsumeView<T, BT>(tag);
86  }
ConsumesCollector collector_
Definition: ModuleBase.h:50
ViewToken< Element > mayConsumeView(InputTag const &)
double T
Definition: Xdiff_gwt.C:5
ModuleDescription const& art::ModuleBase::moduleDescription ( ) const
inherited
void airshower::AirSlicer::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 461 of file AirSlicer_module.cc.

References rb::Cluster::Add(), CountActiveDCM(), art::DataViewImpl::event(), evtNum, evtTime, fCellHitInput, fMaxSliceHits, fRawDataLabel, fTimeSliceInstance, fTrackSliceInstance, rawdata::RawTrigger::fTriggerMask_Prescale, fWriteTimeSlices, art::DataViewImpl::getByLabel(), houghAngleX, houghAngleY, houghMultX, houghMultY, houghStDevX, houghStDevY, MECModelEnuComparisons::i, calib::j, geo::kX, geo::kY, MakeTrackSlices(), ndcm, prescale, art::DataViewImpl::put(), art::DataViewImpl::run(), rb::Cluster::SetNoise(), rb::SortByTime(), subrun, art::DataViewImpl::subRun(), TemporalClusters(), art::DataViewImpl::time(), art::Timestamp::timeHigh(), totalADC, totalHits, trackMultX, trackMultY, and tree.

462  {
463  // Reset tree
464  run = evt.run();
465  subrun = evt.subRun();
466  evtNum = evt.event();
467  evtTime = evt.time().timeHigh();
468  prescale = -999;
469  houghMultY = -999;
470  trackMultY = -999;
471  houghMultX = -999;
472  trackMultX = -999;
473  houghAngleY = -999;
474  houghStDevY = -999;
475  houghAngleX = -999;
476  houghStDevX = -999;
477  totalHits = -999;
478  totalADC = -999;
479 
480  // Modified from DDTPrescaleOffline Package
481  // use rawdata::RawTrigger method to get prescale number
483  evt.getByLabel(fRawDataLabel, rawtrigger);
484  const rawdata::RawTrigger& pre = (*rawtrigger)[0];
486 
490 
491  // Get the cell hits
493  evt.getByLabel(fCellHitInput, hitcol);
494 
495  ndcm = CountActiveDCM(*hitcol);
496 
497  // Load the cell hits into a vector for easy use
498  std::vector<art::Ptr<rb::CellHit > > hitlist;
499  for(unsigned int i = 0; i < hitcol->size(); ++i){
500  art::Ptr<rb::CellHit> hit(hitcol, i);
501  hitlist.push_back(hit);
502  }
503 
504  std::unique_ptr< std::vector<rb::Cluster> > clustercoltime(new std::vector<rb::Cluster>);
505  std::unique_ptr< std::vector<rb::Cluster> > clustercoltracks(new std::vector<rb::Cluster>);
506  rb::Cluster noiseCluster;
507  noiseCluster.SetNoise(true);
508 
509  // Avoid slicing on extremely large events
510  if((int)hitlist.size() > fMaxSliceHits){
511  if ( fWriteTimeSlices ) {
512  clustercoltime->push_back(noiseCluster);
513  evt.put(std::move(clustercoltime),fTimeSliceInstance);
514  }
515 
516  trackMultY=1000;
517  houghMultY=1000;
518  trackMultX=1000;
519  houghMultX=1000;
520 
521  tree->Fill();
522  houghMultY=-999;
523  trackMultY=-999;
524  houghMultX=-999;
525  trackMultX=-999;
526  houghAngleY=-999;
527  houghStDevY=-999;
528  houghAngleX=-999;
529  houghStDevX=-999;
530  totalHits=-999;
531  totalADC=-999;
532  }
533  else{
534  // Sort the hits by time to improve the speed.
535  // WARNING: The rest of the code assumes that the hits are time sorted!
536  rb::SortByTime(hitlist);
537 
538  // Slice hits by time (with minimal spatial proximity in each view)
539  std::vector<rb::Cluster> timeSlices = TemporalClusters(hitlist);
540 
541  // Split time-sliced clusters into separate views
542  std::vector<rb::Cluster> timeSlicesY;
543  std::vector<rb::Cluster> timeSlicesX;
544 
545  for ( unsigned int i = 0; i < timeSlices.size(); ++i ) {
546  if ( timeSlices[i].IsNoise() ) {
547  for ( unsigned int j = 0; j < timeSlices[i].NCell(); ++j ) noiseCluster.Add(timeSlices[i].AllCells()[j]);
548  }
549  rb::Cluster hitsY(geo::kY);
550  rb::Cluster hitsX(geo::kX);
551  for ( unsigned int j = 0; j < timeSlices[i].NCell(); ++j ) {
552  if ( timeSlices[i].AllCells()[j]->View() == geo::kY ) hitsY.Add( timeSlices[i].AllCells()[j] );
553  if ( timeSlices[i].AllCells()[j]->View() == geo::kX ) hitsX.Add( timeSlices[i].AllCells()[j] );
554  }
555  hitsY.SetNoise( timeSlices[i].IsNoise() );
556  hitsX.SetNoise( timeSlices[i].IsNoise() );
557  timeSlicesY.push_back(hitsY);
558  timeSlicesX.push_back(hitsX);
559  }
560  noiseCluster.SetNoise(true);
561 
562  if ( fWriteTimeSlices ) {
563  clustercoltime->push_back(noiseCluster);
564  for ( unsigned int i = 0; i < timeSlices.size(); ++i ) if ( !timeSlices[i].IsNoise() && timeSlices[i].NCell() > 0 ) clustercoltime->push_back(timeSlices[i]);
565  evt.put(std::move(clustercoltime),fTimeSliceInstance);
566  }
567 
568  // Do track slicing on time slices by view
569  for ( unsigned int i = 0; i < timeSlices.size(); ++i ) {
570  if ( timeSlices[i].IsNoise() ) continue;
571  totalHits = timeSlices[i].NCell();
572  totalADC = timeSlices[i].TotalADC();
573  std::vector<rb::Cluster> trackSlicesY;
574  std::vector<rb::Cluster> trackSlicesX;
575 
576  bool mapItrForward(true); // pick direction based on Y-view Hough angle
577 
578  trackSlicesY = MakeTrackSlices( timeSlicesY[i], noiseCluster, geo::kY, mapItrForward );
579  trackSlicesX = MakeTrackSlices( timeSlicesX[i], noiseCluster, geo::kX, mapItrForward );
580 
581  // Add all of our slices to the event store.
582  for ( unsigned int j = 0; j < trackSlicesY.size(); ++j )
583  if ( trackSlicesY[j].NCell() > 0 ) clustercoltracks->push_back(trackSlicesY[j]);
584  for ( unsigned int j = 0; j < trackSlicesX.size(); ++j )
585  if ( trackSlicesX[j].NCell() > 0 ) clustercoltracks->push_back(trackSlicesX[j]);
586 
587  // Fill the ROOT tree and reset the tree variables
588  tree->Fill();
589  houghMultY=-999;
590  trackMultY=-999;
591  houghMultX=-999;
592  trackMultX=-999;
593  houghAngleY=-999;
594  houghStDevY=-999;
595  houghAngleX=-999;
596  houghStDevX=-999;
597  totalHits=-999;
598  totalADC=-999;
599  } // end for
600  }
601 
602  clustercoltracks->push_back(noiseCluster);
603  evt.put(std::move(clustercoltracks),fTrackSliceInstance);
604  }
uint32_t fTriggerMask_Prescale
Definition: RawTrigger.h:44
EventNumber_t event() const
void SetNoise(bool noise)
Declare the cluster to consist of noise hits or not.
Definition: Cluster.h:161
constexpr std::uint32_t timeHigh() const
Definition: Timestamp.h:34
Vertical planes which measure X.
Definition: PlaneGeo.h:28
A collection of associated CellHits.
Definition: Cluster.h:47
void SortByTime(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in time order (earliest to latest).
Definition: CellHit.cxx:134
std::vector< rb::Cluster > MakeTrackSlices(rb::Cluster timeSlice, rb::Cluster &noiseCluster, geo::View_t view, bool &mapItrForward)
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
Definition: Cluster.cxx:84
std::string fRawDataLabel
Data label for trigger prescale.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Definition: DataViewImpl.h:446
Timestamp time() const
SubRunNumber_t subRun() const
const double j
Definition: BetheBloch.cxx:29
RunNumber_t run() const
std::string fCellHitInput
Read CellHits from this input.
std::string fTrackSliceInstance
instance name of track slices
int CountActiveDCM(const std::vector< rb::CellHit > &hitlist)
Definition: run.py:1
std::vector< rb::Cluster > TemporalClusters(std::vector< art::Ptr< rb::CellHit > > hitList)
std::string fTimeSliceInstance
instance name of time slices
Definition: structs.h:12
bool fWriteTimeSlices
save time slices to output file
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:730
int fMaxSliceHits
maximum number of hits to perform slicing
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  )
inherited
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited
std::vector< rb::Cluster > airshower::AirSlicer::TemporalClusters ( std::vector< art::Ptr< rb::CellHit > >  hitList)
protected

Definition at line 209 of file AirSlicer_module.cc.

References rb::Cluster::Add(), e, fMaxHitSepX, fMaxHitSepY, fMaxHitSepZ, fSpecAna, fTimePeakCut, fTimePeakSig, fTimePeakThresh, fTimeRangeHigh, fTimeRangeLow, GetHitPos(), MECModelEnuComparisons::i, calib::j, geo::kX, and geo::kY.

Referenced by produce().

210  {
211  std::map<int,rb::Cluster> clusterMap;
212  clusterMap[0] = rb::Cluster(); // noise hits (unassociated to peaks)
213  std::vector<art::Ptr<rb::CellHit > > cleanHitlist;
214 
215  // Microsecond-level binning
216  TH1D *fTimeHist = new TH1D("fTimeHist",";time [#mus];hits in view",fTimeRangeHigh-fTimeRangeLow,fTimeRangeLow,fTimeRangeHigh);
217  for ( unsigned int i = 0; i < hitlist.size(); ++i ) {
218  double minCellDistXY(1000.);
219  double minCellDistZ(1000.);
220  std::pair<double,double> hitPosI = GetHitPos( hitlist[i] );
221  double maxHitSepXY(0.);
222  if ( hitlist[i]->View() == geo::kY ) maxHitSepXY = fMaxHitSepY;
223  if ( hitlist[i]->View() == geo::kX ) maxHitSepXY = fMaxHitSepX;
224  for ( unsigned int j = 0; j < hitlist.size(); ++j ) {
225  if ( j == i ) continue;
226  double timeDiff = fabs( hitlist[i]->TNS()*1e-3 - hitlist[j]->TNS()*1e-3 );
227  if ( timeDiff > fTimePeakCut ) continue;
228  // Check whether it's isolated in it's own view
229  if ( hitlist[j]->View() == hitlist[i]->View() ) {
230  std::pair<double,double> hitPosJ = GetHitPos( hitlist[j] );
231  double cellDistXY = fabs(hitPosI.first-hitPosJ.first);
232  if ( cellDistXY < minCellDistXY ) minCellDistXY = cellDistXY;
233  double cellDistZ = fabs(hitPosI.second-hitPosJ.second);
234  if ( cellDistZ < minCellDistZ ) minCellDistZ = cellDistZ;
235  }
236  }
237 
238  if ( minCellDistXY > maxHitSepXY || minCellDistZ > fMaxHitSepZ ) {
239  clusterMap[0].Add(hitlist[i]);
240  continue;
241  }
242  cleanHitlist.push_back(hitlist[i]);
243  fTimeHist->Fill( hitlist[i]->TNS()*1e-3 );
244  }
245 
246  int nPeaks = fSpecAna->Search( fTimeHist, fTimePeakSig, "goff nodraw", fTimePeakThresh );
247  double *peaks = fSpecAna->GetPositionX();
248 
249  // Loop through hits and associate to clusters
250  for ( unsigned int i = 0; i < cleanHitlist.size(); ++i ) {
251  int matchPeak(0);
252  // Find matching time peak
253  for ( int p = 0; p < nPeaks; ++p ) {
254  if ( fabs( cleanHitlist[i]->TNS()*1e-3 - peaks[p] ) < fTimePeakCut ) {
255  matchPeak = p+1;
256  break;
257  }
258  }
259  // Add in this hit
260  if ( clusterMap.find(matchPeak) == clusterMap.end() ) clusterMap[matchPeak] = rb::Cluster();
261  clusterMap[matchPeak].Add(cleanHitlist[i]);
262  }
263 
264  // Transfer to output cluster vector
265  std::vector<rb::Cluster> clusterList;
266  for ( auto itr = clusterMap.begin(); itr != clusterMap.end(); ++itr ) {
267  if ( itr->first == 0 ) itr->second.SetNoise(true);
268  clusterList.push_back(itr->second);
269  }
270 
271  delete fTimeHist;
272  return clusterList;
273  }
double fTimePeakThresh
threshold for temporal slice peak search
int fTimeRangeHigh
high edge of time range for temporal slicing (integer microseconds)
const char * p
Definition: xmltok.h:285
Vertical planes which measure X.
Definition: PlaneGeo.h:28
std::pair< double, double > GetHitPos(art::Ptr< rb::CellHit > hit)
A collection of associated CellHits.
Definition: Cluster.h:47
double fTimePeakSig
significance for temporal slice peak search
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
int fTimeRangeLow
low edge of time range for temporal slicing (integer microseconds)
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
Definition: Cluster.cxx:84
double fTimePeakCut
cut for temporal slicing
const double j
Definition: BetheBloch.cxx:29
double fMaxHitSepX
maximum X separation between hits along track slice in X-view
double fMaxHitSepZ
maximum Z separation between hits along track slice
Float_t e
Definition: plot.C:35
double fMaxHitSepY
maximum Y separation between hits along track slice in Y-view
std::string art::EDProducer::workerType ( ) const
inherited

Member Data Documentation

int airshower::AirSlicer::evtNum
protected

Definition at line 110 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

int airshower::AirSlicer::evtTime
protected

Definition at line 111 of file AirSlicer_module.cc.

Referenced by beginJob(), and produce().

std::string airshower::AirSlicer::fCellHitInput
protected

Read CellHits from this input.

Definition at line 65 of file AirSlicer_module.cc.

Referenced by produce().

double airshower::AirSlicer::fChi2NdofCut
protected

cut on Chi2/Ndof for track fit

Definition at line 93 of file AirSlicer_module.cc.

std::vector< int > airshower::AirSlicer::fClusterIDs
protected

Definition at line 101 of file AirSlicer_module.cc.

Referenced by FindNeighbors(), GenerateCluster(), and MakeTrackSlices().

double airshower::AirSlicer::fHoughExtrapPlanes
protected

number of planes required for Hough extrapolation

Definition at line 89 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

double airshower::AirSlicer::fHoughRhoPeakThresh
protected

threshold for Hough map rho peak search

Definition at line 88 of file AirSlicer_module.cc.

double airshower::AirSlicer::fMaxHitSepX
protected

maximum X separation between hits along track slice in X-view

Definition at line 83 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices(), and TemporalClusters().

double airshower::AirSlicer::fMaxHitSepY
protected

maximum Y separation between hits along track slice in Y-view

Definition at line 84 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices(), and TemporalClusters().

double airshower::AirSlicer::fMaxHitSepZ
protected

maximum Z separation between hits along track slice

Definition at line 85 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices(), and TemporalClusters().

double airshower::AirSlicer::fMaxHoughMatchVal
protected

maximum match value for Hough extrapolation

Definition at line 90 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

double airshower::AirSlicer::fMaxNeighborScore
protected

neighbor score cutoff

Definition at line 82 of file AirSlicer_module.cc.

Referenced by FindNeighbors().

int airshower::AirSlicer::fMaxPeaks
protected

maximum number of rho peaks to count

Definition at line 68 of file AirSlicer_module.cc.

Referenced by AirSlicer().

int airshower::AirSlicer::fMaxSliceHits
protected

maximum number of hits to perform slicing

Definition at line 95 of file AirSlicer_module.cc.

Referenced by produce().

int airshower::AirSlicer::fMaxSlices
protected

maximum number of time slices to create

Definition at line 67 of file AirSlicer_module.cc.

Referenced by AirSlicer().

double airshower::AirSlicer::fMinHoughHitSep
protected

minimum separation of hit pairs for Hough map

Definition at line 87 of file AirSlicer_module.cc.

Referenced by GetHoughAngles(), GetHoughMap(), and GetHoughRhos().

double airshower::AirSlicer::fMinHoughPairs
protected

minimum number of hit pairs in maximum Hough angle or rho histogram to proceed

Definition at line 86 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

unsigned int airshower::AirSlicer::fMinPts
protected

minimum number of neighbors for a hit to be in a cluster

Definition at line 66 of file AirSlicer_module.cc.

Referenced by GenerateCluster().

unsigned int airshower::AirSlicer::fMinTrackHits
protected

minimum number of hits for a track slice

Definition at line 91 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

double airshower::AirSlicer::fMinTrackLen
protected

minimum track length for good tracks

Definition at line 94 of file AirSlicer_module.cc.

unsigned int airshower::AirSlicer::fMinTracks
protected

minimum number of tracks in each time slice

Definition at line 92 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

std::vector< std::vector<unsigned int> > airshower::AirSlicer::fNeighborList
protected

Definition at line 100 of file AirSlicer_module.cc.

Referenced by FindNeighbors(), and GenerateCluster().

std::string airshower::AirSlicer::fRawDataLabel
protected

Data label for trigger prescale.

Definition at line 97 of file AirSlicer_module.cc.

Referenced by produce().

double airshower::AirSlicer::fRhoPeakSig
protected

significance for rho peak search

Definition at line 77 of file AirSlicer_module.cc.

Referenced by AirSlicer(), and MakeTrackSlices().

double airshower::AirSlicer::fRhoPeakThresh
protected

threshold for rho peak search

Definition at line 78 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

TSpectrum* airshower::AirSlicer::fRhoSpecAna
protected

Definition at line 104 of file AirSlicer_module.cc.

Referenced by AirSlicer(), and MakeTrackSlices().

bool airshower::AirSlicer::fSaveHists
protected

save intermediate histograms

Definition at line 96 of file AirSlicer_module.cc.

Referenced by MakeTrackSlices().

double airshower::AirSlicer::fSigCellSepX
protected

scale for X separation between cells in X-view to include in non-noise slice

Definition at line 79 of file AirSlicer_module.cc.

Referenced by FindNeighbors().

double airshower::AirSlicer::fSigCellSepY
protected

scale for Y separation between cells in Y-view to include in non-noise slice

Definition at line 80 of file AirSlicer_module.cc.

Referenced by FindNeighbors().

double airshower::AirSlicer::fSigCellSepZ
protected

scale for Z separation between cells to include in non-noise slice

Definition at line 81 of file AirSlicer_module.cc.

Referenced by FindNeighbors().

TSpectrum* airshower::AirSlicer::fSpecAna
protected

Definition at line 103 of file AirSlicer_module.cc.

Referenced by AirSlicer(), and TemporalClusters().

double airshower::AirSlicer::fTimePeakCut
protected

cut for temporal slicing

Definition at line 74 of file AirSlicer_module.cc.

Referenced by TemporalClusters().

double airshower::AirSlicer::fTimePeakSig
protected

significance for temporal slice peak search

Definition at line 75 of file AirSlicer_module.cc.

Referenced by AirSlicer(), and TemporalClusters().

double airshower::AirSlicer::fTimePeakThresh
protected

threshold for temporal slice peak search

Definition at line 76 of file AirSlicer_module.cc.

Referenced by TemporalClusters().

int airshower::AirSlicer::fTimeRangeHigh
protected

high edge of time range for temporal slicing (integer microseconds)

Definition at line 73 of file AirSlicer_module.cc.

Referenced by TemporalClusters().

int airshower::AirSlicer::fTimeRangeLow
protected

low edge of time range for temporal slicing (integer microseconds)

Definition at line 72 of file AirSlicer_module.cc.

Referenced by TemporalClusters().

std::string airshower::AirSlicer::fTimeSliceInstance
protected

instance name of time slices

Definition at line 70 of file AirSlicer_module.cc.

Referenced by AirSlicer(), and produce().

std::string airshower::AirSlicer::fTrackSliceInstance
protected

instance name of track slices

Definition at line 71 of file AirSlicer_module.cc.

Referenced by AirSlicer(), and produce().

bool airshower::AirSlicer::fWriteTimeSlices
protected

save time slices to output file

Definition at line 69 of file AirSlicer_module.cc.

Referenced by produce().

double airshower::AirSlicer::houghAngleX
protected

Definition at line 120 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

double airshower::AirSlicer::houghAngleY
protected

Definition at line 118 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

int airshower::AirSlicer::houghMultX
protected

Definition at line 116 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

int airshower::AirSlicer::houghMultY
protected

Definition at line 114 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

double airshower::AirSlicer::houghStDevX
protected

Definition at line 121 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

double airshower::AirSlicer::houghStDevY
protected

Definition at line 119 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

int airshower::AirSlicer::ndcm
protected

Definition at line 113 of file AirSlicer_module.cc.

Referenced by beginJob(), and produce().

int airshower::AirSlicer::prescale
protected

Definition at line 112 of file AirSlicer_module.cc.

Referenced by beginJob(), and produce().

int airshower::AirSlicer::run
protected
int airshower::AirSlicer::subrun
protected

Definition at line 109 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

int airshower::AirSlicer::totalADC
protected

Definition at line 123 of file AirSlicer_module.cc.

Referenced by beginJob(), and produce().

int airshower::AirSlicer::totalHits
protected

Definition at line 122 of file AirSlicer_module.cc.

Referenced by beginJob(), and produce().

int airshower::AirSlicer::trackMultX
protected

Definition at line 117 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

int airshower::AirSlicer::trackMultY
protected

Definition at line 115 of file AirSlicer_module.cc.

Referenced by beginJob(), MakeTrackSlices(), and produce().

TTree* airshower::AirSlicer::tree
protected

Definition at line 107 of file AirSlicer_module.cc.

Referenced by beginJob(), and produce().


The documentation for this class was generated from the following file: