Skip to content
Snippets Groups Projects
Commit 71e40be5 authored by Mark Jones's avatar Mark Jones
Browse files

Add fdbg_clusters_cal as flag for debugging shower detector and

is set hdbg_clusters_cal in hdebug.param
parent 2ab14e51
No related branches found
No related tags found
No related merge requests found
......@@ -161,7 +161,8 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
{"cal_num_neg_columns", &fNegCols, kInt},
{"cal_slop", &fSlop, kDouble},
{"cal_fv_test", &fvTest, kDouble},
{0}
{"dbg_clusters_cal", &fdbg_clusters_cal, kInt},
{0}
};
gHcParms->LoadParmValues((DBRequest*)&list, prefix);
}
......@@ -169,6 +170,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
cout << "Number of neg. columns = " << fNegCols << endl;
cout << "Slop parameter = " << fSlop << endl;
cout << "Fiducial volum test flag = " << fvTest << endl;
cout << "Cluster debug flag = " <<fdbg_clusters_cal << endl;
BlockThick = new Double_t [fNLayers];
fNBlocks = new Int_t [fNLayers];
......@@ -524,7 +526,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
//
// static const Double_t sqrt2 = TMath::Sqrt(2.);
cout << "THcShower::CoarseProcess called ---------------------------" <<endl;
if (fdbg_clusters_cal) cout << "THcShower::CoarseProcess called ---------------------------" <<endl;
// ApplyCorrections();
......@@ -572,11 +574,13 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
//Print out hits before clustering.
//
fNhits = HitList.size();
cout << "Total hits: " << fNhits << endl;
if (fdbg_clusters_cal) cout << "Total hits: " << fNhits << endl;
for (UInt_t i=0; i!=fNhits; i++) {
cout << "unclustered hit " << i << ": ";
(*(HitList.begin()+i))->show();
if (fdbg_clusters_cal) cout << "unclustered hit " << i << ": ";
if (fdbg_clusters_cal) {
(*(HitList.begin()+i))->show();}
}
THcShowerClusterList* ClusterList = new THcShowerClusterList;
......@@ -585,13 +589,13 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
//Print out the cluster list.
//
fNclust = (*ClusterList).NbClusters();
cout << "Cluster_list size: " << fNclust << endl;
if (fdbg_clusters_cal) cout << "Cluster_list size: " << fNclust << endl;
for (UInt_t i=0; i!=fNclust; i++) {
THcShowerCluster* cluster = (*ClusterList).ListedCluster(i);
cout << "Cluster #" << i
if (fdbg_clusters_cal) cout << "Cluster #" << i
<<": E=" << (*cluster).clE()
<< " Epr=" << (*cluster).clEpr()
<< " X=" << (*cluster).clX()
......@@ -601,7 +605,8 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
for (UInt_t j=0; j!=(*cluster).clSize(); j++) {
THcShowerHit* hit = (*cluster).ClusteredHit(j);
cout << " hit #" << j << ": "; (*hit).show();
if (fdbg_clusters_cal) {
cout << " hit #" << j << ": "; (*hit).show();}
}
}
......@@ -631,7 +636,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
fX = (*MaxCluster).clX();
}
cout << fEpr << " " << fE << " " << fX << " PrSh" << endl;
if (fdbg_clusters_cal) cout << fEpr << " " << fE << " " << fX << " PrSh" << endl;
/*
cout << "Cluster #" << i
......@@ -643,7 +648,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
<< endl;
*/
cout << "THcShower::CoarseProcess return ---------------------------" <<endl;
if (fdbg_clusters_cal) cout << "THcShower::CoarseProcess return ---------------------------" <<endl;
return 0;
}
......
......@@ -117,6 +117,7 @@ protected:
Int_t fNegCols; //number of columns with PMTTs on the negative side only.
Double_t fSlop; //Track to cluster vertical slop distance.
Int_t fvTest; //fiducial volume test flag
Int_t fdbg_clusters_cal; // Shower debug flag
THcShowerPlane** fPlanes; // List of plane objects
......
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