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
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<NuclearizerData>
<Version>1</Version>
<ModuleSequence>
<ModuleSequenceItem>XmlTagLoaderSimulationsSingleDet</ModuleSequenceItem>
<ModuleSequenceItem>XmlTagTACcut</ModuleSequenceItem>
<ModuleSequenceItem>EnergyCalibrationUniversal</ModuleSequenceItem>
<ModuleSequenceItem>XmlTagStripPairingChiSquare</ModuleSequenceItem>
<ModuleSequenceItem>DepthCalibration2024</ModuleSequenceItem>
<ModuleSequenceItem>XmlTagEventSaver</ModuleSequenceItem>
<ModuleSequenceItem>XmlTagLoaderSimulations</ModuleSequenceItem>
<ModuleSequenceItem>XmlTagDEESMEX</ModuleSequenceItem>
</ModuleSequence>
<GeometryFileName>$(NUCLEARIZER)/../STTC_geo/COSI_STTC.geo.setup</GeometryFileName>
<GeometryFileName>$(NUCLEARIZER)/../massmodel-cosi-em-edited/COSISMEX.analysis_BGOreading.geo.setup</GeometryFileName>
<ModuleOptions>
<XmlTagLoaderSimulationsSMEX>
<SimulationFileName />
Expand Down Expand Up @@ -38,11 +34,13 @@
<DepthCalibrationCoeffsFileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/stretch_offset.csv</DepthCalibrationCoeffsFileName>
<DepthCalibrationTACCalFileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/taccal_240225_channelsmapped.csv</DepthCalibrationTACCalFileName>
<DepthCalibrationSplinesFileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/ctd_depth_122.0keV_AnodeCathode.csv</DepthCalibrationSplinesFileName>
<ACSEnergyCorrectionFileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/ACS_correction_file.txt</ACSEnergyCorrectionFileName>
<ApplyFudgeFactor>true</ApplyFudgeFactor>
<UseStopAfter>false</UseStopAfter>
<MaximumAcceptedEvents>10000000</MaximumAcceptedEvents>
</XmlTagLoaderSimulationsSingleDet>
<XmlTagLoaderSimulations>
<SimulationFileName>/Users/parshadkp/Software/Nuclearizer_files/SingleDetBGO-GeD/Cosima/Cs137_singleDetBGO-GeD_sourceHolderPos_1166700Flux_10s_0050_Fluore_.inc1.id1.sim.gz</SimulationFileName>
</XmlTagLoaderSimulations>
<XmlTagMeasurementLoaderROA>
<FileName>$(NUCLEARIZER)/../Data/roas/asic_gse_240412194613.hdf.roa</FileName>
</XmlTagMeasurementLoaderROA>
Expand All @@ -51,36 +49,36 @@
<LoadContinuationFiles>false</LoadContinuationFiles>
<FileNameStripMap />
</XmlTagMeasurementLoaderHDF>
<XmlTagReceiverBalloon>
<DistributorName>128.32.13.133</DistributorName>
<DistributorPort>215261</DistributorPort>
<DistributorStreamID>OP</DistributorStreamID>
<LocalReceivingHostName>128.32.13.133</LocalReceivingHostName>
<LocalReceivingPort>21530</LocalReceivingPort>
<DataSelectionMode>2</DataSelectionMode>
<AspectMode>0</AspectMode>
<RoaFileName />
</XmlTagReceiverBalloon>
<XmlTagMeasurementLoaderBinary>
<FileName />
<DataSelectionMode>2</DataSelectionMode>
<AspectSelectionMode>0</AspectSelectionMode>
<CoincidenceMerging>1</CoincidenceMerging>
</XmlTagMeasurementLoaderBinary>
<XmlTagDEESMEX>
<ShieldEnergyCorrectionFileName>/Users/parshadkp/Software/nuclearizer_parshad_fork/resource/calibration/COSI_SingleDet/ShieldEnergyCorrection.csv</ShieldEnergyCorrectionFileName>
<DeadtimeFileName>/Users/parshadkp/Software/nuclearizer_parshad_fork/resource/calibration/COSI_SingleDet/deadtimeParameters.txt</DeadtimeFileName>
<EnergyCalibrationFileName>/Users/parshadkp/Software/nuclearizer_parshad_fork/resource/calibration/COSI_SingleDet/20240819_Am241_Cs137_Co57_LV.ecal</EnergyCalibrationFileName>
<DeadtimeFileName>/Users/parshadkp/Software/nuclearizer_parshad_fork/resource/calibration/COSI_SingleDet/deadtimeParameters.txt</DeadtimeFileName>
</XmlTagDEESMEX>
<XmlTagEventFilter>
<MinimumTotalEnergy>0</MinimumTotalEnergy>
<MaximumTotalEnergy>10000</MaximumTotalEnergy>
<MinimumHVStrips>0</MinimumHVStrips>
<MaximumHVStrips>20</MaximumHVStrips>
<MinimumLVStrips>0</MinimumLVStrips>
<MaximumLVStrips>20</MaximumLVStrips>
<MinimumHits>0</MinimumHits>
<MaximumHits>100</MaximumHits>
<MinimumReducedChiSquare>-1</MinimumReducedChiSquare>
<MaximumReducedChiSquare>inf</MaximumReducedChiSquare>
</XmlTagEventFilter>
<EnergyCalibrationUniversal>
<FileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/20240819_Am241_Cs137_Co57_LV.ecal</FileName>
<TempFileName />
<PreampTemperature>0</PreampTemperature>
<ThresholdFileEnabled>false</ThresholdFileEnabled>
<ThresholdFileName />
<ThresholdValueEnabled>false</ThresholdValueEnabled>
<ThresholdValue>0</ThresholdValue>
</EnergyCalibrationUniversal>
<StripPairingGreedy_b>
<Mode>0</Mode>
</StripPairingGreedy_b>
<XmlTagStripPairingMultiRoundChiSquare />
<XmlTagStripPairingChiSquare />
<ChargeSharingCorrection />
<DepthCalibration>
<CoeffsFileName />
<SplinesFileName />
Expand All @@ -93,9 +91,6 @@
<SplinesFileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/ctd_depth_122.0keV.reformat.csv</SplinesFileName>
<UCSDOverride>0</UCSDOverride>
</DepthCalibration2024>
<CrosstalkCorrection>
<FileName>$(NUCLEARIZER)/resource/calibration/COSI_SingleDet/CrossTalkCorrection_Results_190726.txt</FileName>
</CrosstalkCorrection>
<XmlTagEventSaver>
<FileName>/Users/parshadkp/Library/CloudStorage/OneDrive-ClemsonUniversity/COSI/nuclearizer_files/nuclearizer_outputs/STTC/STTC_DEE_Cs137.evta</FileName>
<Mode>2</Mode>
Expand Down
16 changes: 8 additions & 8 deletions include/MCrystalHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "MGlobal.h"

// Nuclearizer libs
#include "MReadOutElement.h"
#include "MReadOutElementVoxel3D.h"

// Forward declarations:

Expand All @@ -45,17 +45,17 @@ class MCrystalHit
void Clear();

//! Get the read-out element
MReadOutElement* GetReadOutElement() const { return m_ReadOutElement; }
MReadOutElementVoxel3D* GetReadOutElement() const { return m_ReadOutElement; }

//! Set the Crystal ID
void SetCrystalID(int StripID) { m_ReadOutElement->SetDetectorID(StripID); }
void SetCrystalID(unsigned int CrystalID) { m_ReadOutElement->SetCrystalID(CrystalID); }
//! Return the Crystal ID
int GetCrystalID() const { return m_ReadOutElement->GetDetectorID(); }
unsigned int GetCrystalID() const { return m_ReadOutElement->GetCrystalID(); }

//! Set the Detector ID - this derived from the crystal ID
void SetDetectorID(int DetectorID) { m_ReadOutElement->SetDetectorID(DetectorID); }
void SetDetectorID(MString DetectorID) { m_ReadOutElement->SetDetectorID(DetectorID); }
//! Return the Detector ID- this derived from the crystal ID
int GetDetectorID() const { return m_ReadOutElement->GetDetectorID(); }
MString GetDetectorID() const { return m_ReadOutElement->GetDetectorID(); }

//! Set whether the crystal has triggered
void HasTriggered(bool HasTriggered) { m_HasTriggered = HasTriggered; }
Expand Down Expand Up @@ -115,7 +115,7 @@ class MCrystalHit
// private members:
private:
//! The read-out element with a single ID (representing the crystal ID)
MReadOutElement* m_ReadOutElement;
MReadOutElementVoxel3D* m_ReadOutElement;
//! Crystal has triggered
bool m_HasTriggered;
//! Crystal has vetoed
Expand All @@ -142,4 +142,4 @@ class MCrystalHit
#endif


////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
9 changes: 5 additions & 4 deletions include/MDEECrystalHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ using namespace std;
// MEGAlib libs:
#include "MGlobal.h"
#include "MCrystalHit.h"
#include "MReadOutElement.h"
// #include "MReadOutElement.h"
#include "MReadOutElementVoxel3D.h"

// Forward declarations:

Expand Down Expand Up @@ -55,8 +56,8 @@ struct MDEECrystalHit {
MVector m_SimulatedPosition; // original: Position
//! The simulated position in the detector
MVector m_SimulatedPositionInDetector;
//! Detector ID (1: -X, 2:+X, 3: -Y, 4:+Y, 5:Z )
unsigned int m_DetectorID;
//! Detector ID (X0, X1, Y0, Y1, Z0, Z1)
MString m_DetectorID;
//! Crystal ID
unsigned int m_CrystalID;
//! The simulated voxel (X, Y, Z) IDs
Expand All @@ -71,7 +72,7 @@ struct MDEECrystalHit {
// The shield data - which can be in process of being created

//! The read-out element
MReadOutElement m_ROE;
MReadOutElementVoxel3D m_ROE;

//! A unique lookup ID of the crystal hit
unsigned int m_ID;
Expand Down
4 changes: 2 additions & 2 deletions include/MGUIOptionsDEESMEX.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ class MGUIOptionsDEESMEX : public MGUIOptions
TGCheckButton* m_StopAfter;
//! Entry field for the maximum number of accepted events
MGUIEEntry* m_MaximumAcceptedEvents;


//! ACS DEE energy correction file
MGUIEFileSelector* m_ShieldEnergyCorrectionFileSelector;
//! Select deadtime constants file
MGUIEFileSelector* m_DeadtimeFileSelector;


#ifdef ___CLING___
Expand Down
2 changes: 1 addition & 1 deletion include/MGUIOptionsEventSaver.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class MGUIOptionsEventSaver : public MGUIOptions
TGCheckButton* m_SplitFile;
//! Entry field for the time after which to split the file
MGUIEEntry* m_SplitFileTime;

//! Checkbutton to include or exclude ADCs in the roa file
TGCheckButton* m_RoaWithADCs;
//! Checkbutton to include or exclude TACs in the roa file
Expand Down
11 changes: 11 additions & 0 deletions include/MModuleDEESMEX.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ class MModuleDEESMEX : public MModule
return m_ShieldEnergyCorrection.GetShieldEnergyCorrectionFileName();
}

//! Set shield energy correction file name
void SetDeadtimeFileName(const MString& FileName)
{
m_StripTrigger.SetDeadtimeFileName(FileName);
}
//! Set energy calibration file name
MString GetDeadtimeFileName() const
{
return m_StripTrigger.GetDeadtimeFileName();
}

// protected methods:
protected:
// private methods:
Expand Down
10 changes: 5 additions & 5 deletions include/MReadOutElementVoxel3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* MReadOutElementVoxel3D.h
*
*
* Copyright (C) by Andreas Zoglauer, Valentina Fioretti.
* Copyright (C) by Andreas Zoglauer, Valentina Fioretti, Parshad Patel.
* All rights reserved.
*
* Please see the source-file for the copyright-notice.
Expand Down Expand Up @@ -39,7 +39,7 @@ class MReadOutElementVoxel3D : public MReadOutElement
MReadOutElementVoxel3D();

//! full constructor - Read out element of a voxel 3D
MReadOutElementVoxel3D(unsigned int m_DetectorID, unsigned int m_CrystalID, unsigned int m_VoxelXID, unsigned int m_VoxelYID, unsigned int m_VoxelZID);
MReadOutElementVoxel3D(MString m_DetectorID, unsigned int m_CrystalID, unsigned int m_VoxelXID, unsigned int m_VoxelYID, unsigned int m_VoxelZID);

//! Simple default destructor
virtual ~MReadOutElementVoxel3D();
Expand All @@ -61,11 +61,11 @@ class MReadOutElementVoxel3D : public MReadOutElement
virtual MString GetType() const;

//! Setters and getters
void SetDetectorID(unsigned int DetectorID)
void SetDetectorID(MString DetectorID)
{
m_DetectorID = DetectorID;
}
unsigned int GetDetectorID() const
MString GetDetectorID() const
{
return m_DetectorID;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ class MReadOutElementVoxel3D : public MReadOutElement
private:
// protected members:
protected:
unsigned int m_DetectorID; //!< Detector ID
MString m_DetectorID; //!< Detector ID
unsigned int m_CrystalID; //!< Crystal ID

unsigned int m_VoxelXID; //!< Voxel index X
Expand Down
Loading