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
13 changes: 10 additions & 3 deletions Detectors/TOF/prototyping/drawTOFgeometry.C
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void drawTOFgeometry()
"BFRB BFRR BBMO BBCE BBTRD BBLB BBLL BBRB BBRR BBC1 BBC2 BBC3 BBC4 BBD1 BBD3 BBD2 BBD4 FTOA FTOB FTOC FLTA FLTB "
"FLTC FWZ1D FWZAD FWZ1U FWZBU FWZ2 FWZC FWZ3 FWZ4 FSTR FHON FPC1 FPC2 FPCB FSEN FSEZ FPAD FRGL FGLF FPEA FPEB "
"FALT FALB FPE1 FPE4 FPE2 FPE3 FIF1 FIF2 FIF3 FFC1 FFC2 FFC3 FCC1 FCC2 FCC3 FAIA FAIB FAIC FCA1 FCA2 FFEA FAL1 "
"FRO1 FREE FBAR FBA1 FBA2 FAL2 FAL3 FRO2 FTUB FITU FTLN FLO1 FLO2 FLO3 FBAS FBS1 FBS2 FCAB FCAL FCBL FSAW FCBB "
"FRO1 FBAR FBA1 FBA2 FAL2 FAL3 FRO2 FTUB FITU FTLN FBAS FBS1 FBS2 FCAB FCAL FCBL FSAW FCBB "
"FCOV FCOB FCOP FTOS";

TObjArray* lToHide = ToHide.Tokenize(" ");
Expand All @@ -82,8 +82,8 @@ void drawTOFgeometry()
TString ToShow =
"BTOF0 BFMO BFIR BFOR BFLB BFRB BBMO BBCE BBLB BBRB FTOA FTOB FTOC FLTA FLTB FLTC FWZ1D FWZAD FWZ1U FWZBU FWZ2 "
"FWZC FWZ3 FWZ4 FSTR FHON FPC1 FPC2 FPCB FSEN FSEZ FPAD FRGL FGLF FPEA FPEB FALT FALB FPE1 FPE4 FPE2 FPE3 FIF1 "
"FIF2 FIF3 FFC1 FFC2 FFC3 FCC1 FCC2 FCC3 FAIA FAIB FAIC FCA1 FCA2 FFEA FAL1 FRO1 FREE FBAR FBA1 FBA2 FAL2 FAL3 "
"FRO2 FTUB FITU FTLN FLO1 FLO2 FLO3 FBAS FBS1 FBS2 FCAB FCAL FCBL FSAW FCBB FCOV FCOB FCOP FTOS";
"FIF2 FIF3 FFC1 FFC2 FFC3 FCC1 FCC2 FCC3 FAIA FAIB FAIC FCA1 FCA2 FFEA FAL1 FRO1 FBAR FBA1 FBA2 FAL2 FAL3 "
"FRO2 FTUB FITU FTLN FBAS FBS1 FBS2 FCAB FCAL FCBL FSAW FCBB FCOV FCOB FCOP FTOS";
// ToShow.ReplaceAll("FCOV", "");//Remove external cover but PHOS hole
// ToShow.ReplaceAll("FLTA", "");//Remove internal cover but PHOS hole
ToShow.ReplaceAll("FFC1", ""); // Remove internal cover but PHOS hole
Expand All @@ -101,6 +101,13 @@ void drawTOFgeometry()
while ((name = (TObjString*)iToShow->Next()))
gGeoManager->GetVolume(name->GetName())->SetVisibility(kTRUE);

// the pieces of the SM longitudinal cooling bars, whose volumes are named at build time
TIter iVolume(gGeoManager->GetListOfVolumes());
TGeoVolume* volume;
while ((volume = (TGeoVolume*)iVolume()))
if (TString(volume->GetName()).BeginsWith("FLOS"))
volume->SetVisibility(kTRUE);

const TString ToTrans = "FTOS FCOV FLTA";

TObjArray* lToTrans = ToTrans.Tokenize(" ");
Expand Down
26 changes: 26 additions & 0 deletions Detectors/TOF/simulation/include/TOFSimulation/Detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#include "SimulationDataFormat/BaseHits.h"
#include "CommonUtils/ShmAllocator.h"

#include <array>
#include <map>
#include <vector>

class TGeoVolume;

class FairVolume;

namespace o2
Expand Down Expand Up @@ -114,6 +120,22 @@ class Detector : public o2::base::DetImpl<Detector>
void makeFEACooling(Float_t xtof) const;
void makeNinoMask(Float_t xtof) const;
void makeSuperModuleCooling(Float_t xtof, Float_t ytof, Float_t zlenA) const;
/// one FEA card container of a supermodule: where it sits along z and how it is placed
struct FEAContainer {
Float_t z;
Int_t row;
Bool_t rotated;
};
/// returns the FEA card containers of one supermodule, in placement order; creates nothing
std::vector<FEAContainer> feaContainers(Float_t zlenA, Bool_t holes) const;
/// creates the FCM1/FCM2 assemblies, the central FEA card container, and places them in FAIA/FAIC
void makeCentralFEAContainer(Float_t ytof) const;
/// returns the volume for one piece of a cooling bar, creating it the first time a size is asked for
TGeoVolume* coolingBarPiece(Double_t dx, Double_t dy, Double_t dz) const;
/// places one longitudinal cooling bar as the pieces that survive between the FEA containers
void placeCoolingBar(const char* mother, const std::vector<FEAContainer>& cont, Double_t crateDZ,
Double_t crateY0, Double_t crateY1, Double_t xcoor, Double_t dx, Double_t ycoor,
Double_t dy, Double_t zcoor, Double_t dz, Int_t& copy) const;
void makeSuperModuleServices(Float_t xtof, Float_t ytof, Float_t zlenA) const;
void makeReadoutCrates(Float_t ytof) const;

Expand Down Expand Up @@ -142,6 +164,10 @@ class Detector : public o2::base::DetImpl<Detector>
/// container for data points
std::vector<HitType>* mHits; //!

/// the cooling-bar piece volumes created so far, keyed by the piece half-sizes {dx, dy, dz},
/// so that each distinct size is created once and placed many times
mutable std::map<std::array<Double_t, 3>, TGeoVolume*> mBarPieces; //!

template <typename Det>
friend class o2::base::DetImpl;
ClassDefOverride(Detector, 1);
Expand Down
Loading