Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions apps/TrappingCorrectionAm241.cxx
Comment thread
sophieehaight marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,6 @@ bool TrappingCorrectionAm241::Analyze()
for (unsigned int f = 0; f<HDFNames.size(); ++f) {

MString File = HDFNames[f];
cout<<"Beginning analysis of file "<<File<<endl;

// Create and initialize nuclearizer modules
MSupervisor* S = MSupervisor::GetSupervisor();
Expand All @@ -350,7 +349,6 @@ bool TrappingCorrectionAm241::Analyze()
MModuleEventFilter* EventFilter;

unsigned int MNumber = 0;
cout<<"Creating HDF5 loader"<<endl;
Loader = new MModuleLoaderMeasurementsHDF();
Loader->SetFileNameStripMap(m_StripMapFile);
Loader->SetFileName(File);
Expand All @@ -371,7 +369,6 @@ bool TrappingCorrectionAm241::Analyze()
S->SetModule(EnergyCalibrator, MNumber);
++MNumber;

cout<<"Creating Event filter"<<endl;
// Only use events with 1 to 3 Strip Hits on each side
// After strip pairing, we'll also filter to make sure we're only looking at single Hits
EventFilter = new MModuleEventFilter();
Expand All @@ -385,8 +382,7 @@ bool TrappingCorrectionAm241::Analyze()
EventFilter->SetMaximumTotalEnergy(m_MaxEnergy*2); // Multiply by 2 because this is the event-level energy, i.e. sum over both sides
S->SetModule(EventFilter, MNumber);
++MNumber;

cout<<"Creating strip pairing"<<endl;

MModule* Pairing;
if (m_MultiRoundStripPairing == true) {
Pairing = new MModuleStripPairingMultiRoundChiSquare();
Expand All @@ -395,22 +391,16 @@ bool TrappingCorrectionAm241::Analyze()
}
S->SetModule(Pairing, MNumber);

cout<<"Initializing Loader"<<endl;
if (Loader->Initialize() == false) return false;
cout<<"Initializing TAC calibrator"<<endl;
if (TACCalibrator->Initialize() == false) return false;
cout<<"Initializing Energy calibrator"<<endl;
if (EnergyCalibrator->Initialize() == false) return false;
cout<<"Initializing Event filter"<<endl;
if (EventFilter->Initialize() == false) return false;
cout<<"Initializing Pairing"<<endl;
if (Pairing->Initialize() == false) return false;

bool IsFinished = false;
MReadOutAssembly* Event = new MReadOutAssembly();

// Pass Events through each module. Once calibrated, add the Event to the histograms
cout<<"Analyzing..."<<endl;
while ((IsFinished == false) && (m_Interrupt == false)) {
Event->Clear();

Expand Down Expand Up @@ -469,7 +459,7 @@ bool TrappingCorrectionAm241::Analyze()
MStripHit* HVSH = GetDominantStrip(HVStrips, HVEnergyFraction);
MStripHit* LVSH = GetDominantStrip(LVStrips, LVEnergyFraction);

if ((LVSH->HasCalibratedTiming()==true) && (HVSH->HasCalibratedTiming()==true)) {
if ((LVSH->HasFastTiming()==true) && (HVSH->HasFastTiming()==true)&& (LVSH != nullptr) && (HVSH != nullptr)) {

double CTD = LVSH->GetTiming() - HVSH->GetTiming();

Expand Down
Loading
Loading