Skip to content

Commit

Permalink
SST boxes medium will now follow DecayVolumeMedium
Browse files Browse the repository at this point in the history
  • Loading branch information
olantwin committed Dec 9, 2024
1 parent 517e797 commit 0896c8a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ it in future.
### Changed

* Set Decay Volume Medium as helium (previously vacuums),can be explicitly switched to vacuum with --vacuums.
* Medium of SST boxes will be the same as DecayVolumeMedium (previously, always vacuum)

### Removed

Expand Down
3 changes: 2 additions & 1 deletion python/shipDet_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,9 @@ def configure(run, ship_geo):
ship_geo.strawtubes.DeltazFrame = 10.0 * u.cm
ship_geo.strawtubes.FrameLateralWidth = 1.0 * u.cm
ship_geo.strawtubes.FrameMaterial = "aluminium"
ship_geo.strawtubes.medium = "vacuums" if ship_geo.DecayVolumeMedium == "vaccums" else "air"

Strawtubes = ROOT.strawtubes("Strawtubes", ROOT.kTRUE)
Strawtubes = ROOT.strawtubes(ship_geo.strawtubes.medium)
Strawtubes.SetZpositions(
ship_geo.vetoStation.z,
ship_geo.TrackStation1.z,
Expand Down
36 changes: 25 additions & 11 deletions strawtubes/strawtubes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,29 @@ using std::cout;
using std::endl;

strawtubes::strawtubes()
: FairDetector("strawtubes", kTRUE, kStraw),
fTrackID(-1),
fVolumeID(-1),
fPos(),
fMom(),
fTime(-1.),
fLength(-1.),
fELoss(-1),
fstrawtubesPointCollection(new TClonesArray("strawtubesPoint"))
: FairDetector("Strawtubes", kTRUE, kStraw)
, fTrackID(-1)
, fVolumeID(-1)
, fPos()
, fMom()
, fTime(-1.)
, fLength(-1.)
, fELoss(-1)
, fMedium("air")
, fstrawtubesPointCollection(new TClonesArray("strawtubesPoint"))
{}

strawtubes::strawtubes(std::string medium)
: FairDetector("Strawtubes", kTRUE, kStraw)
, fTrackID(-1)
, fVolumeID(-1)
, fPos()
, fMom()
, fTime(-1.)
, fLength(-1.)
, fELoss(-1)
, fMedium(medium)
, fstrawtubesPointCollection(new TClonesArray("strawtubesPoint"))
{
}

Expand Down Expand Up @@ -337,8 +351,8 @@ void strawtubes::ConstructGeometry()
TGeoMedium *tungsten = gGeoManager->GetMedium("tungsten");
InitMedium(fFrame_material);
TGeoMedium *FrameMatPtr = gGeoManager->GetMedium(fFrame_material);
InitMedium("vacuum");
TGeoMedium *med = gGeoManager->GetMedium("vacuum");
InitMedium(fMedium.c_str());
TGeoMedium* med = gGeoManager->GetMedium(fMedium.c_str());

gGeoManager->SetVisLevel(4);
gGeoManager->SetTopVisible();
Expand Down
5 changes: 4 additions & 1 deletion strawtubes/strawtubes.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class strawtubes: public FairDetector
*/
strawtubes(const char* Name, Bool_t Active);

strawtubes(std::string medium);

/** default constructor */
strawtubes();

Expand Down Expand Up @@ -147,9 +149,10 @@ class strawtubes: public FairDetector
Int_t fStraws_per_layer_tr34; //! Number of straws in one tr34 layer
Double_t v_drift; //! drift velocity
Double_t sigma_spatial; //! spatial resolution
std::string fMedium; //! vacuum box medium
/** container for data points */

TClonesArray* fstrawtubesPointCollection;
TClonesArray* fstrawtubesPointCollection;

strawtubes(const strawtubes&);
strawtubes& operator=(const strawtubes&);
Expand Down

0 comments on commit 0896c8a

Please sign in to comment.