154 int fClusterHitsMC = 0;
156 for (
size_t iCluster = 0; iCluster < clusters->size(); ++iCluster) {
160 if (aCluster.
NCell()==0)
continue;
181 std::map<int, int> mapInteractionCounts;
184 std::vector<unsigned int> fFEBs;
194 (aHit->IsMC()) ?
fAdcMc = aHit->ADC() :
fAdcBg = aHit->ADC();
196 if (fMinADC==0 || aHit->ADC() < fMinADC) fMinADC = aHit->ADC();
197 if (fMaxADC==0 || aHit->ADC() > fMaxADC) fMaxADC = aHit->ADC();
201 unsigned int fFEB = aHit->DaqChannel() & 0xFFFFFF00;
202 if (std::find(fFEBs.begin(), fFEBs.end(), fFEB) == fFEBs.end()) fFEBs.push_back(fFEB);
210 float totalPairwiseADC = 0;
211 float totalPairwiseTNS = 0;
212 for (
size_t i=0;
i<allHits.size()-1; ++
i) {
213 for (
size_t j=
i+1;
j<allHits.size(); ++
j) {
216 totalPairwiseADC =
std::abs(allHits[
i]->ADC() - allHits[
j]->ADC());
217 totalPairwiseTNS =
std::abs(allHits[
i]->TNS() - allHits[
j]->TNS());
237 fNFEB = fFEBs.size();
247 int fEventHitsMC = 0;
249 if (aHit.IsMC()) ++fEventHitsMC;
back track the reconstruction to the simulation
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
int fAdcDiff
Cluster Purity (Nsig / Ntotal)
void GetCenter(double *xyz, double localz=0.0) const
void analyze(art::Event const &e) override
double fMeanTNS
Average of hit-pairwise TNS differences in a cluster.
float fPairwiseADC
Cluster view span (1 or 2)
double fSumMeV
Std. Dev. of cluster ADCs.
art::ServiceHandle< art::TFileService > tfs
Float_t x1[n_points_granero]
int fPlaneDiff
Difference in ADC between pair-wise hits.
const CellGeo * Cell(int icell) const
Vertical planes which measure X.
A collection of associated CellHits.
double MeanZ(rb::AveragingScheme scheme=kDefaultScheme) const
int fNFEB
ADC for BG hits.
const PlaneGeo * Plane(unsigned int i) const
DEFINE_ART_MODULE(TestTMapFile)
SNSlicerAna(fhicl::ParameterSet const &p)
int fSpanViews
Cluster cell span in Y-view (cells)
Horizontal planes which measure Y.
art::PtrVector< rb::CellHit > AllCells() const
Get all cells from both views.
double fMeanZ
Cluster Y mean.
unsigned int ExtentCell(geo::View_t view) const
double MeanX(rb::AveragingScheme scheme=kDefaultScheme) const
double TotalADC() const
Sum of the ADC of all the contained hits.
double MeanY(rb::AveragingScheme scheme=kDefaultScheme) const
int fSpanCellY
Cluster cell span in X-view (cells)
double fMeanY
Cluster X mean.
int fNHitsMC
Min time of the cluster.
double fMeanX
Cluster time mean (ns)
SNSlicerAna & operator=(SNSlicerAna const &)=delete
Remove hits from hot and cold channels.
int fSpanCellX
Cluster plane span (planes)
int fClusterId
ART event number.
float fPairwiseTNS
Average of hit-pairwise ADC differences in a cluster.
std::string fCellHitLabel
EDAnalyzer(Table< Config > const &config)
double fSumADC
Number of distinct FEBs in the cluster.
float fPurity
Number of MC hits (in all clusters / total in event)
unsigned int NYCell() const
Number of cells in the y-view.
int fNHitsBG
Number of MC hits in cluster.
EventNumber_t event() const
int fAdcMc
Number of non-MC hits in cluster.
A rawdata::RawDigit with channel information decoded.
T * make(ARGS...args) const
art::ServiceHandle< geo::Geometry > fGeom
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
double fClusterTNS
Unique ID for each cluster in the event.
unsigned int NXCell() const
Number of cells in the x-view.
double MeanTNS(rb::AveragingScheme scheme=kDefaultScheme) const
unsigned int ExtentPlane(geo::View_t view=geo::kXorY) const
double TotalGeV(EEnergyCalcScheme escheme=kRecomputeEnergy) const
Simple sum of the estimated GeV of all the hits.
int fSpanPlane
Cluster time span (ns)
double fMeanADC
Difference between max and min ADCs.
double fSpanTNS
Cluster total energy (MeV)
int fAdcBg
ADC for MC hits.
int fSpanADC
Total cluster ADC.
std::string fClusterLabel
double fStdADC
Mean cluster ADC.
float fClusterEfficiency
Cluster Z mean.
Encapsulate the geometry of one entire detector (near, far, ndos)