Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:18:22

0001 #include <math.h>
0002 
0003 class G4Material;
0004 class DetectorConstruction;
0005 class CherenkovDetector;
0006 class CherenkovDetectorCollection;
0007 
0008 #ifndef _ASPHERIC_LENS_
0009 #define _ASPHERIC_LENS_
0010 
0011 // 300 conical slices is a good enough approximation;
0012 #define _ASPHERIC_LENS_SLICE_COUNT_ 500//300
0013 
0014 // If uncommented, absorb photons which reach this side surface; 
0015 // FIXME: should probably implement a diffuse scattering?;
0016 #define _WITH_BLACK_TAPE_ON_LENS_SIDE_
0017 #define _PHOTON_DETECTOR_THICKNESS_ (0.1*mm)
0018 
0019 // Uncomment if want to kill photons which reach either front or rear side of the lens;
0020 // FIXME: and how is it supposed to work for the tip slice?!;
0021 //#define _FIRST_LAYERS_BLACK_HOLE_ 100
0022 //#define _LAST_LAYER_BLACK_HOLE_   
0023 
0024 // Uncomment if want to place a black blinding circle in the center;
0025 //#define _BLACK_SPOT_DIAMETER_ (25.0)
0026 
0027 class AsphericLens {
0028  public:
0029  AsphericLens(G4Material *material, double dia, double cr, double k, double d, double e, double f, double g,
0030               double h, double j, double l, double et): mMaterial(material), mDiameter(dia), 
0031     mConvexRadius(cr), mK(k), mD(d), mE(e), mF(f), mG(g), mH(h), mJ(j), mL(l), mET(et) {};
0032   ~AsphericLens() {};
0033 
0034   double Z(double Y) const {
0035     return (Y*Y/mConvexRadius)/(1.0 + sqrt(1.0 - (1.0+mK)*Y*Y/(mConvexRadius*mConvexRadius))) + 
0036       mD*pow(Y,2) + mE*pow(Y,4) + mF*pow(Y,6) + mG*pow(Y,8) + mH*pow(Y,10) + mJ*pow(Y,12) + mL*pow(Y,14);
0037   };
0038 
0039   void Install(CherenkovDetectorCollection *geometry,
0040            DetectorConstruction *detector, CherenkovDetector *cdet, DarkBox *dbox,
0041            double zOffset, bool flip = true);
0042 
0043   G4Material *mMaterial;
0044   double mDiameter, mConvexRadius, mK, mD, mE, mF, mG, mH, mJ, mL, mET;
0045 };
0046 
0047 #endif
0048 
0049 
0050