Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 10:37:28

0001 
0002 #include <map>
0003 
0004 #include "G4SystemOfUnits.hh"
0005 
0006 #ifndef _PFRICH_MATERIALS_
0007 #define _PFRICH_MATERIALS_
0008 
0009 class G4Element;
0010 class G4Material;
0011 class G4RadiatorMaterial;
0012 
0013 #include <CherenkovWaveLengthRange.h>
0014   
0015 // Uncomment to disable Rayleigh scattering and / or absorption by hand; 
0016 //#define _DISABLE_RAYLEIGH_SCATTERING_
0017 //#define _DISABLE_ABSORPTION_
0018 
0019 // Create text files which can be cut'n'paste in ePIC optical_materials.xml file; 
0020 #define _DUMP_SELECTED_MATERIALS_
0021 
0022 // Eventually this is a single place where these two are defined;
0023 #define _INCH_                             (25.4*mm)
0024 #define _MIL_                          (_INCH_/1000)
0025 
0026 // -- Aerogel ---------------------------------------------------------------------------------
0027 //
0028 #define _AEROGEL_BELLE_II_SMALL_REFRACTIVE_INDEX_ 0
0029 #define _AEROGEL_BELLE_II_LARGE_REFRACTIVE_INDEX_ 1
0030 #define _AEROGEL_BELLE_II_REFRACTIVE_INDEX_1_04_  2
0031 // FIXME: this does not look nice, but suffices;
0032 #define _AEROGEL_CLAS12_DENSITY_155_MG_CM3_     155
0033 #define _AEROGEL_CLAS12_DENSITY_225_MG_CM3_     225
0034 
0035 // If uncommented: fixed refractive index, no attenuation (single-layer CLAS12 config only);
0036 //#define _AEROGEL_FIXED_REFRACTIVE_INDEX_    (1.044)
0037 // --------------------------------------------------------------------------------------------
0038 
0039 // -- Acrylic filter --------------------------------------------------------------------------
0040 //
0041 #define _ACRYLIC_WL_CUTOFF_                 (300*nm)
0042 
0043 // Does not need to be precise;
0044 #define _ACRYLIC_DENSITY_               (1.18*g/cm3)
0045 
0046 // If uncommented: fixed refractive index, no attenuation; 
0047 //#define _ACRYLIC_FIXED_REFRACTIVE_INDEX_      (1.50)
0048 // --------------------------------------------------------------------------------------------
0049 
0050 // -- Carbon fiber honeycomb sandwich ---------------------------------------------------------
0051 //
0052 // Rad. length of the carbon fiber, epoxy glue and honeycomb as provided by 
0053 // Prakhar on 02/25/2023;
0054 #define _CF_RAD_LENGTH_                    (23.4*cm)
0055 #define _EG_RAD_LENGTH_                    (35.7*cm)
0056 #define _HC_RAD_LENGTH_                   (845.4*cm)
0057 // Used only in the material composition calculation;
0058 #define _CF_THICKNESS_                    (10*_MIL_)
0059 #define _EG_THICKNESS_                    (10*_MIL_)
0060 
0061 #define _FR4_RAD_LENGTH_                   (19.4*cm)
0062 // --------------------------------------------------------------------------------------------
0063 
0064 // -- Wavelength range ------------------------------------------------------------------------
0065 //
0066 // "Nominal" wavelength at which average refractive index will be calculated; FIXME: remove;
0067 // should rather store a fine step n(nu) lookup table in the CherenkovRadiator structure
0068 // after the GEANT pass; the problem is that n(<lambda>) is needed not only for the active 
0069 // radiator, where calibration photons are readily available, but also for say quartz to 
0070 // calculate the optical path correctly (and photon generation in the window may be suppressed); 
0071 //#define _LAMBDA_NOMINAL_                     (470.0)
0072 #define _LAMBDA_NOMINAL_                     (365.0)
0073 #define _MAGIC_CFF_                         (1239.8)
0074 
0075 // As 2023/03/09 consider wavelength range from 150um to 800um; 
0076 #define _WLDIM_                                  27
0077 #define _LAMBDA_MIN_                         (150.0)
0078 #define _LAMBDA_MAX_                         (800.0)
0079 #define _NU_MIN_       (eV*_MAGIC_CFF_/_LAMBDA_MAX_)
0080 #define _NU_MAX_       (eV*_MAGIC_CFF_/_LAMBDA_MIN_)
0081 #define _NU_STEP_ ((_NU_MAX_ - _NU_MIN_)/(_WLDIM_-1))
0082 // --------------------------------------------------------------------------------------------
0083 
0084 // FIXME: this needs to be verified (and actually the QE at normal incidence renormalized); 
0085 // The problem here is that when the QE is measured on a test stand, a fraction of photons 
0086 // actually bounces back off the window-photocathode boundary (I think); since this same 
0087 // bouncing is then taken care by GEANT, a double counting must occur; just making this 
0088 // refractive index more or less equal to the window one would solve the normalization problem, 
0089 // but will also eliminate bouncing all together, which is not realistic either since a 
0090 // non-negligible number of photons (especially in case of a photon flash produced in a 
0091 // window) actually *will* be bouncing in the window, moving away from their initial 
0092 // impact (creation) point;   
0093 #define _BIALKALI_REFRACTIVE_INDEX_           (2.80)//(1.47)
0094 
0095 class Materials: public CherenkovWaveLengthRange {
0096 public:
0097   Materials();
0098   virtual ~Materials() {};
0099 
0100   // The only two needed outside of the DetectorConstruction class;
0101   G4RadiatorMaterial *Nitrogen( void )    { return m_Nitrogen; };
0102   G4RadiatorMaterial *FusedSilica( void ) { return m_FusedSilica; };
0103   G4Material *Absorber( void )            { return m_Absorber; };
0104 
0105   static void DumpMaterialProperty(const G4Material *material, const char *property,
0106                    double scale, const char *fmt);
0107   
0108  protected:
0109   void DefineElements( void );
0110   void DefineMaterials( void );
0111 
0112   // Basic elements;
0113   G4Element *m_C, *m_N, *m_O, *m_F, *m_H, *m_Si, *m_K, *m_Na, *m_Sb, *m_Al, *m_Ca;
0114 
0115   // Materials;
0116   G4Material *m_Air, *m_Absorber, *m_Bialkali, *m_Aluminum, *m_CarbonFiber, *m_Ceramic, *m_Silver, *m_Titanium;
0117   // Fake carbon to calibrate radiation length of the honeycomb samples; will be created 
0118   // consisting of pure carbon, density 1g/cm^3; 
0119   G4Material *m_FakeCarbon_1_g_cm3; 
0120   // A honeycomb sandwich with epoxy glue (10mil+10mil+1/2"+10mil+10mil), or a 1/4"-based combination;
0121   G4Material *m_HalfInch_CF_HoneyComb, *m_QuarterInch_CF_HoneyComb;  
0122   // FR4 imitation with appropriate rad. length;
0123   G4Material *m_FR4, *m_Water, *m_Copper, *m_Silicon, *m_Delrin, *m_PEEK;
0124 
0125   G4RadiatorMaterial *m_Nitrogen, *m_Acrylic, *m_FusedSilica, *m_C2F6, *m_Sapphire;
0126   std::map<unsigned, G4RadiatorMaterial*> m_Aerogel;
0127 };
0128 
0129 #endif