Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*
0002  * PolyconeHistorical.h
0003  *
0004  *  Created on: Apr 27, 2017
0005  *      Author: rsehgal
0006  */
0007 
0008 #ifndef VOLUMES_POLYCONEHISTORICAL_H_
0009 #define VOLUMES_POLYCONEHISTORICAL_H_
0010 
0011 /*
0012 #include "VecGeom/base/Global.h"
0013 #include "VecGeom/base/AlignedBase.h"
0014 #include "VecGeom/base/Vector3D.h"
0015 #include "VecGeom/volumes/UnplacedVolume.h"
0016 #include "VecGeom/volumes/UnplacedCone.h"
0017 #include "VecGeom/base/Vector.h"
0018 #include <vector>
0019 #include "VecGeom/volumes/Wedge.h"
0020 */
0021 namespace vecgeom {
0022 inline namespace VECGEOM_IMPL_NAMESPACE {
0023 
0024 class PolyconeHistorical {
0025 public:
0026   VECCORE_ATT_HOST_DEVICE
0027   PolyconeHistorical() : fHStart_angle(0.), fHOpening_angle(0.), fHNum_z_planes(0), fHZ_values(0), fHRmin(0), fHRmax(0)
0028   {
0029   }
0030   VECCORE_ATT_HOST_DEVICE
0031   PolyconeHistorical(int z_planes) : fHStart_angle(0.), fHOpening_angle(0.), fHNum_z_planes(z_planes)
0032   {
0033     fHZ_values = new double[z_planes];
0034     fHRmin     = new double[z_planes];
0035     fHRmax     = new double[z_planes];
0036     for (int i = 0; i < z_planes; i++) {
0037       fHZ_values[i] = 0.0;
0038       fHRmin[i]     = 0.0;
0039       fHRmax[i]     = 0.0;
0040     }
0041   }
0042   VECCORE_ATT_HOST_DEVICE
0043   ~PolyconeHistorical()
0044   {
0045     delete[] fHZ_values;
0046     delete[] fHRmin;
0047     delete[] fHRmax;
0048   }
0049   VECCORE_ATT_HOST_DEVICE
0050   PolyconeHistorical(const PolyconeHistorical &source)
0051   {
0052     fHStart_angle   = source.fHStart_angle;
0053     fHOpening_angle = source.fHOpening_angle;
0054     fHNum_z_planes  = source.fHNum_z_planes;
0055 
0056     fHZ_values = new double[fHNum_z_planes];
0057     fHRmin     = new double[fHNum_z_planes];
0058     fHRmax     = new double[fHNum_z_planes];
0059 
0060     for (int i = 0; i < fHNum_z_planes; i++) {
0061       fHZ_values[i] = source.fHZ_values[i];
0062       fHRmin[i]     = source.fHRmin[i];
0063       fHRmax[i]     = source.fHRmax[i];
0064     }
0065   }
0066   VECCORE_ATT_HOST_DEVICE
0067   PolyconeHistorical &operator=(const PolyconeHistorical &right)
0068   {
0069     if (&right == this) return *this;
0070 
0071     fHStart_angle   = right.fHStart_angle;
0072     fHOpening_angle = right.fHOpening_angle;
0073     fHNum_z_planes  = right.fHNum_z_planes;
0074 
0075     delete[] fHZ_values;
0076     delete[] fHRmin;
0077     delete[] fHRmax;
0078     fHZ_values = new double[fHNum_z_planes];
0079     fHRmin     = new double[fHNum_z_planes];
0080     fHRmax     = new double[fHNum_z_planes];
0081 
0082     for (int i = 0; i < fHNum_z_planes; i++) {
0083       fHZ_values[i] = right.fHZ_values[i];
0084       fHRmin[i]     = right.fHRmin[i];
0085       fHRmax[i]     = right.fHRmax[i];
0086     }
0087 
0088     return *this;
0089   }
0090 
0091   double fHStart_angle;
0092   double fHOpening_angle;
0093   int fHNum_z_planes;
0094   double *fHZ_values;
0095   double *fHRmin;
0096   double *fHRmax;
0097 };
0098 }
0099 }
0100 
0101 #endif /* VOLUMES_POLYCONEHISTORICAL_H_ */