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

Implemented the clustering debug flag (Mark).

parent e647e89b
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,8 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000) { ...@@ -7,7 +7,8 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000) {
if (RunNumber == 50017) { if (RunNumber == 50017) {
char* RunFileNamePattern="daq04_%d.log.0"; char* RunFileNamePattern="daq04_%d.log.0";
} else { } else {
char* RunFileNamePattern="/cache/mss/hallc/daq04/raw/daq04_%d.log.0"; // char* RunFileNamePattern="/cache/mss/hallc/daq04/raw/daq04_%d.log.0";
char* RunFileNamePattern="/scratch/tadevosn/daq04_%d.log.0";
} }
gHcParms->Define("gen_run_number", "Run Number", RunNumber); gHcParms->Define("gen_run_number", "Run Number", RunNumber);
gHcParms->AddString("g_ctp_database_filename", "DBASE/test.database"); gHcParms->AddString("g_ctp_database_filename", "DBASE/test.database");
......
...@@ -161,6 +161,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) ...@@ -161,6 +161,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
{"cal_num_neg_columns", &fNegCols, kInt}, {"cal_num_neg_columns", &fNegCols, kInt},
{"cal_slop", &fSlop, kDouble}, {"cal_slop", &fSlop, kDouble},
{"cal_fv_test", &fvTest, kDouble}, {"cal_fv_test", &fvTest, kDouble},
{"dbg_clusters_cal", &fdbg_clusters_cal, kInt},
{0} {0}
}; };
gHcParms->LoadParmValues((DBRequest*)&list, prefix); gHcParms->LoadParmValues((DBRequest*)&list, prefix);
...@@ -169,6 +170,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date ) ...@@ -169,6 +170,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
cout << "Number of neg. columns = " << fNegCols << endl; cout << "Number of neg. columns = " << fNegCols << endl;
cout << "Slop parameter = " << fSlop << endl; cout << "Slop parameter = " << fSlop << endl;
cout << "Fiducial volum test flag = " << fvTest << endl; cout << "Fiducial volum test flag = " << fvTest << endl;
cout << "Cluster debug flag = " << fdbg_clusters_cal << endl;
BlockThick = new Double_t [fNLayers]; BlockThick = new Double_t [fNLayers];
fNBlocks = new Int_t [fNLayers]; fNBlocks = new Int_t [fNLayers];
...@@ -524,6 +526,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks ...@@ -524,6 +526,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
// //
// static const Double_t sqrt2 = TMath::Sqrt(2.); // static const Double_t sqrt2 = TMath::Sqrt(2.);
if (fdbg_clusters_cal)
cout << "THcShower::CoarseProcess called ---------------------------" <<endl; cout << "THcShower::CoarseProcess called ---------------------------" <<endl;
// ApplyCorrections(); // ApplyCorrections();
...@@ -573,37 +576,43 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks ...@@ -573,37 +576,43 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
//Print out hits before clustering. //Print out hits before clustering.
// //
fNhits = HitList.size(); fNhits = HitList.size();
cout << "Total hits: " << fNhits << endl;
for (UInt_t i=0; i!=fNhits; i++) { if (fdbg_clusters_cal) {
cout << "unclustered hit " << i << ": "; cout << "Total hits: " << fNhits << endl;
(*(HitList.begin()+i))->show(); for (UInt_t i=0; i!=fNhits; i++) {
cout << "unclustered hit " << i << ": ";
(*(HitList.begin()+i))->show();
}
} }
THcShowerClusterList* ClusterList = new THcShowerClusterList; THcShowerClusterList* ClusterList = new THcShowerClusterList;
ClusterList->ClusterHits(HitList); ClusterList->ClusterHits(HitList);
fNclust = (*ClusterList).NbClusters();
//Print out the cluster list. //Print out the cluster list.
// //
fNclust = (*ClusterList).NbClusters(); if (fdbg_clusters_cal) {
cout << "Cluster_list size: " << fNclust << endl; cout << "Cluster_list size: " << fNclust << endl;
for (UInt_t i=0; i!=fNclust; i++) { for (UInt_t i=0; i!=fNclust; i++) {
THcShowerCluster* cluster = (*ClusterList).ListedCluster(i); THcShowerCluster* cluster = (*ClusterList).ListedCluster(i);
cout << "Cluster #" << i cout << "Cluster #" << i
<<": E=" << (*cluster).clE() <<": E=" << (*cluster).clE()
<< " Epr=" << (*cluster).clEpr() << " Epr=" << (*cluster).clEpr()
<< " X=" << (*cluster).clX() << " X=" << (*cluster).clX()
<< " Z=" << (*cluster).clZ() << " Z=" << (*cluster).clZ()
<< " size=" << (*cluster).clSize() << " size=" << (*cluster).clSize()
<< endl; << endl;
for (UInt_t j=0; j!=(*cluster).clSize(); j++) {
THcShowerHit* hit = (*cluster).ClusteredHit(j);
cout << " hit #" << j << ": "; (*hit).show();
}
for (UInt_t j=0; j!=(*cluster).clSize(); j++) {
THcShowerHit* hit = (*cluster).ClusteredHit(j);
cout << " hit #" << j << ": "; (*hit).show();
} }
} }
...@@ -612,9 +621,6 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks ...@@ -612,9 +621,6 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
if (fNclust != 0) { if (fNclust != 0) {
// THcShowerCluster* MaxCluster;
// for (UInt_t i=0; i!=fNclust; i++) {
THcShowerCluster* MaxCluster = (*ClusterList).ListedCluster(0); THcShowerCluster* MaxCluster = (*ClusterList).ListedCluster(0);
fE = (*MaxCluster).clE(); fE = (*MaxCluster).clE();
...@@ -636,19 +642,12 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks ...@@ -636,19 +642,12 @@ Int_t THcShower::CoarseProcess( TClonesArray& ) //tracks
fX = (*MaxCluster).clX(); fX = (*MaxCluster).clX();
} }
cout << fEpr << " " << fE << " " << fX << " PrSh" << endl; if (fdbg_clusters_cal)
cout << fEpr << " " << fE << " " << fX << " PrSh" << endl;
/*
cout << "Cluster #" << i if (fdbg_clusters_cal)
<<": E=" << (*cluster).clE()
<< " Epr=" << (*cluster).clEpr()
<< " X=" << (*cluster).clX()
<< " Z=" << (*cluster).clZ()
<< " size=" << (*cluster).clSize()
<< endl;
*/
cout << "THcShower::CoarseProcess return ---------------------------" <<endl; cout << "THcShower::CoarseProcess return ---------------------------" <<endl;
return 0; return 0;
} }
......
...@@ -110,6 +110,8 @@ public: ...@@ -110,6 +110,8 @@ public:
Double_t fSlop; // Track to cluster vertical slop distance. Double_t fSlop; // Track to cluster vertical slop distance.
Int_t fvTest; // fiducial volume test flag for tracking Int_t fvTest; // fiducial volume test flag for tracking
Int_t fdbg_clusters_cal; // Shower debug flag
THcShowerPlane** fPlanes; // [fNLayers] Shower Plane objects THcShowerPlane** fPlanes; // [fNLayers] Shower Plane objects
TClonesArray* fTrackProj; // projection of track onto plane TClonesArray* fTrackProj; // projection of track onto plane
......
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