Skip to content
Snippets Groups Projects
Commit 1e5a7655 authored by Mark Jones's avatar Mark Jones Committed by Stephen A. Wood
Browse files

Modify THcDC.cxx to skip pedestal events in Decode.

parent 3e6f4329
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "THaDetMap.h" #include "THaDetMap.h"
#include "THcDetectorMap.h" #include "THcDetectorMap.h"
#include "THcGlobals.h" #include "THcGlobals.h"
#include "THaCutList.h"
#include "THcParmList.h" #include "THcParmList.h"
#include "THcDCTrack.h" #include "THcDCTrack.h"
#include "VarDef.h" #include "VarDef.h"
...@@ -445,35 +446,36 @@ Int_t THcDC::Decode( const THaEvData& evdata ) ...@@ -445,35 +446,36 @@ Int_t THcDC::Decode( const THaEvData& evdata )
// Get the Hall C style hitlist (fRawHitList) for this event // Get the Hall C style hitlist (fRawHitList) for this event
fNhits = DecodeToHitList(evdata); fNhits = DecodeToHitList(evdata);
// Let each plane get its hits if(!gHaCuts->Result("Pedestal_event")) {
Int_t nexthit = 0; // Let each plane get its hits
for(Int_t ip=0;ip<fNPlanes;ip++) { Int_t nexthit = 0;
nexthit = fPlanes[ip]->ProcessHits(fRawHitList, nexthit); for(Int_t ip=0;ip<fNPlanes;ip++) {
fN_True_RawHits += fPlanes[ip]->GetNRawhits(); nexthit = fPlanes[ip]->ProcessHits(fRawHitList, nexthit);
fN_True_RawHits += fPlanes[ip]->GetNRawhits();
} }
// Let each chamber get its hits // Let each chamber get its hits
for(Int_t ic=0;ic<fNChambers;ic++) { for(Int_t ic=0;ic<fNChambers;ic++) {
fChambers[ic]->ProcessHits(); fChambers[ic]->ProcessHits();
fNthits += fChambers[ic]->GetNHits(); fNthits += fChambers[ic]->GetNHits();
} }
// fRawHitList is TClones array of THcRawDCHit objects // fRawHitList is TClones array of THcRawDCHit objects
Int_t counter=0; Int_t counter=0;
if (fdebugprintrawdc) { if (fdebugprintrawdc) {
cout << " RAW_TOT_HITS = " << fNRawHits << endl; cout << " RAW_TOT_HITS = " << fNRawHits << endl;
cout << " Hit # " << "Plane " << " Wire " << " Raw TDC " << endl; cout << " Hit # " << "Plane " << " Wire " << " Raw TDC " << endl;
for(Int_t ihit = 0; ihit < fNRawHits ; ihit++) { for(Int_t ihit = 0; ihit < fNRawHits ; ihit++) {
THcRawDCHit* hit = (THcRawDCHit *) fRawHitList->At(ihit); THcRawDCHit* hit = (THcRawDCHit *) fRawHitList->At(ihit);
for(Int_t imhit = 0; imhit < hit->fNHits; imhit++) { for(Int_t imhit = 0; imhit < hit->fNHits; imhit++) {
counter++; counter++;
cout << counter << " " << hit->fPlane << " " << hit->fCounter << " " << hit->fTDC[imhit] << endl; cout << counter << " " << hit->fPlane << " " << hit->fCounter << " " << hit->fTDC[imhit] << endl;
}
} }
cout << endl;
}
Eff(); // Accumlate statistics
} }
cout << endl;
}
Eff(); // Accumlate statistics
return fNhits; return fNhits;
} }
......
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