Skip to content
Snippets Groups Projects
Commit d23813c1 authored by Vardan Tadevosyan's avatar Vardan Tadevosyan
Browse files

Add hit clusters in THcShowerAray.

parent b3e0ecdb
No related branches found
No related tags found
No related merge requests found
...@@ -303,8 +303,10 @@ Int_t THcShowerArray::DefineVariables( EMode mode ) ...@@ -303,8 +303,10 @@ Int_t THcShowerArray::DefineVariables( EMode mode )
{"p", "Dynamic ADC Pedestal", "fP"}, {"p", "Dynamic ADC Pedestal", "fP"},
{"a_p", "Sparsified, ped-subtracted ADC Amplitudes", "fA_p"}, {"a_p", "Sparsified, ped-subtracted ADC Amplitudes", "fA_p"},
{ "nhits", "Number of hits", "fNhits" }, { "nhits", "Number of hits", "fNhits" },
{ "nclust", "Number of clusters", "fNclust" },
{"e", "Energy Depositions per block", "fE"}, {"e", "Energy Depositions per block", "fE"},
{"earray", "Energy Deposition in array", "fEarray"}, {"earray", "Energy Deposition in array", "fEarray"},
{ "ntracks", "Number of shower tracks", "fNtracks" },
{ 0 } { 0 }
}; };
...@@ -318,6 +320,8 @@ void THcShowerArray::Clear( Option_t* ) ...@@ -318,6 +320,8 @@ void THcShowerArray::Clear( Option_t* )
fADCHits->Clear(); fADCHits->Clear();
fNhits = 0; fNhits = 0;
fNclust = 0;
fNtracks = 0;
for (THcShowerClusterListIt i=fClusterList->begin(); i!=fClusterList->end(); for (THcShowerClusterListIt i=fClusterList->begin(); i!=fClusterList->end();
++i) { ++i) {
...@@ -379,6 +383,40 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks ) ...@@ -379,6 +383,40 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks )
} }
} }
// Fill list of clusters.
fParent->ClusterHits(HitSet, fClusterList);
fNclust = (*fClusterList).size(); //number of clusters
if (fParent->fdbg_clusters_cal) {
cout << " Clustered hits. Number of clusters: " << fNclust << endl;
UInt_t i = 0;
for (THcShowerClusterListIt ppcl = (*fClusterList).begin();
ppcl != (*fClusterList).end(); ppcl++) {
cout << " Cluster #" << i++
<<": E=" << clE(*ppcl)
<< " Epr=" << clEpr(*ppcl)
<< " X=" << clX(*ppcl)
<< " Z=" << clZ(*ppcl)
<< " size=" << (**ppcl).size()
<< endl;
Int_t j=0;
for (THcShowerClusterIt pph=(**ppcl).begin(); pph!=(**ppcl).end();
pph++) {
cout << " hit " << j++ << ": ";
(**pph).show();
}
}
cout << "---------------------------------------------------------------\n";
}
return 0; return 0;
} }
......
...@@ -120,6 +120,9 @@ protected: ...@@ -120,6 +120,9 @@ protected:
Double_t fEarray; // Total Energy deposition in the array. Double_t fEarray; // Total Energy deposition in the array.
Int_t fNhits; // Total number of hits Int_t fNhits; // Total number of hits
Int_t fNclust; // Number of clusters
Int_t fNtracks; // Number of shower tracks, i.e. number of
// cluster-to-track association
THcShowerClusterList* fClusterList; // List of hit clusters THcShowerClusterList* fClusterList; // List of hit clusters
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment