diff --git a/src/THcShower.cxx b/src/THcShower.cxx index 8d580a197039c6de154c5946ddbcd4f64002a0a8..62c9ad941ed85c41804516adea28a6edcffdec07 100644 --- a/src/THcShower.cxx +++ b/src/THcShower.cxx @@ -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; } diff --git a/src/THcShower.h b/src/THcShower.h index 5094d0670cf0d4475622368776bc4949f11ff5a1..1a72c567739d3bed974dae6e7e7c428e540dbeb1 100644 --- a/src/THcShower.h +++ b/src/THcShower.h @@ -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