Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -35,15 +35,16 @@
|
||||
|
||||
#include "G4Element.hh"
|
||||
|
||||
class CCalAMaterial : public CCalMaterial {
|
||||
class CCalAMaterial : public CCalMaterial
|
||||
{
|
||||
friend std::ostream& operator<<(std::ostream&, const CCalAMaterial&);
|
||||
|
||||
public:
|
||||
//Construct from list of constituents
|
||||
CCalAMaterial(G4String mat, double dens, int nelem,
|
||||
CCalAMaterial** constituents, double* weights);
|
||||
CCalAMaterial(G4String mat, G4double dens, G4int nelem,
|
||||
CCalAMaterial** constituents, G4double* weights);
|
||||
//Construct from one element
|
||||
CCalAMaterial(G4String elemat, double Aeff, double dens);
|
||||
CCalAMaterial(G4String elemat, G4double Aeff, G4double dens);
|
||||
//Copy constructor
|
||||
CCalAMaterial(const CCalAMaterial&);
|
||||
virtual ~CCalAMaterial();
|
||||
@@ -53,7 +54,8 @@ public:
|
||||
CCalAMaterial& operator= (const CCalAMaterial&); //Assignment
|
||||
|
||||
protected:
|
||||
void computeAeff(G4int nconst, CCalAMaterial** constituents, double* weights);
|
||||
void computeAeff(G4int nconst, CCalAMaterial** constituents,
|
||||
G4double* weights);
|
||||
|
||||
protected:
|
||||
double aEff; //Effective mass
|
||||
|
||||
@@ -35,27 +35,27 @@ class CCalDataSet
|
||||
{
|
||||
public:
|
||||
|
||||
void insert(double anEnergy, double aXsection)
|
||||
void insert(G4double anEnergy, G4double aXsection)
|
||||
{
|
||||
pair<double, double> aPoint(anEnergy, aXsection);
|
||||
pair<G4double, G4double> aPoint(anEnergy, aXsection);
|
||||
theData.push_back(aPoint);
|
||||
}
|
||||
|
||||
double getCrossSection(double anEnergy)
|
||||
double getCrossSection(G4double anEnergy)
|
||||
{
|
||||
double result;
|
||||
G4double result;
|
||||
if(anEnergy < theData[0].first)
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
double x1,x2;
|
||||
double y1,y2;
|
||||
G4double x1,x2;
|
||||
G4double y1,y2;
|
||||
if(anEnergy > theData[theData.size()-1].second)
|
||||
{
|
||||
// extrapolation
|
||||
int n=theData.size();
|
||||
G4int n=theData.size();
|
||||
x1 = theData[n-1].first;
|
||||
y1 = theData[n-1].second;
|
||||
x2 = theData[n-2].first;
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
{
|
||||
// linear search and interpolation
|
||||
unsigned int i;
|
||||
for(i=0; i<theData.size(); i++)
|
||||
for(i=0; i<theData.size(); ++i)
|
||||
{
|
||||
if(theData[i].first>anEnergy) break;
|
||||
}
|
||||
@@ -86,6 +86,6 @@ private:
|
||||
|
||||
private:
|
||||
|
||||
vector<pair<double, double> > theData;
|
||||
vector<pair<G4double, G4double> > theData;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -77,8 +77,8 @@ public:
|
||||
G4String Name() const {return detectorName;}
|
||||
G4String baseFileName() const {return fileName;}
|
||||
G4String File() const {return fileName+".geom";}
|
||||
CCalDetector* getDaughter(int i) const {return theDetectorsInside[i];}
|
||||
int getNDaughters() const {return theDetectorsInside.size();}
|
||||
CCalDetector* getDaughter(G4int i) const {return theDetectorsInside[i];}
|
||||
G4int getNDaughters() const {return theDetectorsInside.size();}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -99,7 +99,7 @@ protected:
|
||||
|
||||
//Should read a file and store the information inside the concrete
|
||||
//CCalDetector
|
||||
virtual int readFile() = 0;
|
||||
virtual G4int readFile() = 0;
|
||||
//Construct the daughters by calling the apropiate constructors
|
||||
virtual void constructDaughters() = 0;
|
||||
|
||||
@@ -107,7 +107,7 @@ protected:
|
||||
//Building related methods
|
||||
|
||||
//Builds the detector from a file
|
||||
int buildFromFile();
|
||||
G4int buildFromFile();
|
||||
|
||||
protected:
|
||||
////////////////////////////////////////////////////////////////
|
||||
@@ -119,7 +119,7 @@ protected:
|
||||
|
||||
CCalDetectorTable theDetectorsInside; //A collection of CCalDetectors inside
|
||||
|
||||
int constructFlag; //True if this detector is to be built
|
||||
G4int constructFlag; //True if this detector is to be built
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,9 @@
|
||||
|
||||
#include "CCalDetector.hh"
|
||||
|
||||
class CCalEcal: public CCalDetector {
|
||||
class CCalEcal: public CCalDetector
|
||||
{
|
||||
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalEcal(const G4String &name):
|
||||
@@ -40,74 +42,58 @@ public:
|
||||
virtual ~CCalEcal();
|
||||
|
||||
//Get Methods
|
||||
G4String getGenMat() const {return genMat;}
|
||||
double getWidBox() const {return widBox;}
|
||||
double getLengBox() const {return lengBox;}
|
||||
double getXpos() const {return xpos;}
|
||||
double getYpos() const {return ypos;}
|
||||
double getZpos() const {return zpos;}
|
||||
double getThetaX() const {return thetaX;}
|
||||
double getPhiX() const {return phiX;}
|
||||
double getThetaY() const {return thetaY;}
|
||||
double getPhiY() const {return phiY;}
|
||||
double getThetaZ() const {return thetaZ;}
|
||||
double getPhiZ() const {return phiZ;}
|
||||
G4String getLayMat() const {return layMat;}
|
||||
int getLayNum() const {return layNum;}
|
||||
double getLayRadius() const {return layRadius;}
|
||||
double getLayAngle() const {return layAngle;}
|
||||
double getLengFront() const {return lengFront;}
|
||||
double getLayPar(unsigned int i) const {return layPar[i];}
|
||||
G4String getCrystMat() const {return crystMat;}
|
||||
int getCrystNum() const {return crystNum;}
|
||||
double getCrystLength() const {return crystLength;}
|
||||
double getCrystTol() const {return crystTol;}
|
||||
double getCrystPar(unsigned int i) const {return crystPar[i];}
|
||||
G4String getSuppMat() const {return suppMat;}
|
||||
double getDxSupp() const {return dxSupp;}
|
||||
double getDySupp() const {return dySupp;}
|
||||
double getDzSupp() const {return dzSupp;}
|
||||
double getDistSupp() const {return distSupp;}
|
||||
G4String getGenMat() const {return genMat;}
|
||||
G4double getWidBox() const {return widBox;}
|
||||
G4double getLengBox() const {return lengBox;}
|
||||
G4double getXpos() const {return xpos;}
|
||||
G4double getYpos() const {return ypos;}
|
||||
G4double getZpos() const {return zpos;}
|
||||
G4double getThetaX() const {return thetaX;}
|
||||
G4double getPhiX() const {return phiX;}
|
||||
G4double getThetaY() const {return thetaY;}
|
||||
G4double getPhiY() const {return phiY;}
|
||||
G4double getThetaZ() const {return thetaZ;}
|
||||
G4double getPhiZ() const {return phiZ;}
|
||||
G4String getLayMat() const {return layMat;}
|
||||
G4int getLayNum() const {return layNum;}
|
||||
G4double getLayRadius() const {return layRadius;}
|
||||
G4double getLayAngle() const {return layAngle;}
|
||||
G4double getLengFront() const {return lengFront;}
|
||||
G4double getLayPar(unsigned int i) const {return layPar[i];}
|
||||
G4String getCrystMat() const {return crystMat;}
|
||||
G4int getCrystNum() const {return crystNum;}
|
||||
G4double getCrystLength() const {return crystLength;}
|
||||
G4double getCrystTol() const {return crystTol;}
|
||||
G4double getCrystPar(unsigned int i) const {return crystPar[i];}
|
||||
G4String getSuppMat() const {return suppMat;}
|
||||
G4double getDxSupp() const {return dxSupp;}
|
||||
G4double getDySupp() const {return dySupp;}
|
||||
G4double getDzSupp() const {return dzSupp;}
|
||||
G4double getDistSupp() const {return distSupp;}
|
||||
|
||||
|
||||
protected:
|
||||
virtual int readFile();
|
||||
virtual G4int readFile();
|
||||
virtual void constructDaughters();
|
||||
|
||||
private:
|
||||
G4String genMat; //General material
|
||||
double widBox, lengBox; //Box parameters
|
||||
double xpos, ypos, zpos; //Translation matrix definition
|
||||
double thetaX,phiX,thetaY,phiY,thetaZ,phiZ; //Rotation matrix definition
|
||||
G4double widBox, lengBox; //Box parameters
|
||||
G4double xpos, ypos, zpos; //Translation matrix definition
|
||||
G4double thetaX,phiX,thetaY,phiY,thetaZ,phiZ; //Rotation matrix definition
|
||||
G4String layMat; //Material for the layers
|
||||
int layNum; //Layer numbers
|
||||
double layRadius,layAngle; //Positioning parameters
|
||||
double lengFront; //Distance from front
|
||||
double layPar[5]; //Layer parameters
|
||||
G4int layNum; //Layer numbers
|
||||
G4double layRadius,layAngle; //Positioning parameters
|
||||
G4double lengFront; //Distance from front
|
||||
G4double layPar[5]; //Layer parameters
|
||||
G4String crystMat; //Material for the crystals
|
||||
int crystNum; //Crystal numbers
|
||||
double crystLength; //Crystal length
|
||||
double crystTol; //Tolerance for position
|
||||
double crystPar[5]; //Crystal parameters
|
||||
G4int crystNum; //Crystal numbers
|
||||
G4double crystLength; //Crystal length
|
||||
G4double crystTol; //Tolerance for position
|
||||
G4double crystPar[5]; //Crystal parameters
|
||||
G4String suppMat; //Material of support system
|
||||
double dxSupp, dySupp, dzSupp; //Dimension of support material
|
||||
double distSupp; //Separation of support material
|
||||
G4double dxSupp, dySupp, dzSupp; //Dimension of support material
|
||||
G4double distSupp; //Separation of support material
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
|
||||
#include "CCalVOrganization.hh"
|
||||
|
||||
class CCalEcalOrganization: public CCalVOrganization {
|
||||
class CCalEcalOrganization: public CCalVOrganization
|
||||
{
|
||||
|
||||
public:
|
||||
CCalEcalOrganization(){};
|
||||
|
||||
@@ -75,17 +75,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
#include "CCalHit.hh"
|
||||
|
||||
|
||||
class CCalG4Hit : public G4VHit, public CCalHit {
|
||||
class CCalG4Hit : public G4VHit, public CCalHit
|
||||
{
|
||||
|
||||
friend std::ostream& operator<< (std::ostream& os, const CCalG4Hit& hit);
|
||||
|
||||
@@ -52,19 +53,19 @@ public:
|
||||
void Draw(){}
|
||||
void Print();
|
||||
|
||||
double getEM() const;
|
||||
G4double getEM() const;
|
||||
void setEM (double e);
|
||||
|
||||
double getHadr() const;
|
||||
void setHadr (double e);
|
||||
G4double getHadr() const;
|
||||
void setHadr (G4double e);
|
||||
|
||||
void addEnergyDeposit(const CCalG4Hit& aHit);
|
||||
void addEnergyDeposit(double em, double hd);
|
||||
void addEnergyDeposit(G4double em, G4double hd);
|
||||
|
||||
private:
|
||||
|
||||
double elem; // EnergyDeposit of EM particles
|
||||
double hadr; // EnergyDeposit of HD particles
|
||||
G4double elem; // EnergyDeposit of EM particles
|
||||
G4double hadr; // EnergyDeposit of HD particles
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -34,23 +34,21 @@
|
||||
#include <map>
|
||||
#include "CCalutils.hh"
|
||||
|
||||
class CCalGeometryConfiguration {
|
||||
|
||||
class CCalGeometryConfiguration
|
||||
{
|
||||
struct GCInfo {
|
||||
G4String FileName;
|
||||
int ConstructFlag;
|
||||
G4int ConstructFlag;
|
||||
};
|
||||
|
||||
typedef std::map<G4String, GCInfo, std::less<G4String> > CCalGeometryConfTable;
|
||||
typedef std::map<G4String, GCInfo, std::less<G4String> >::iterator CCalGeometryConfIterator;
|
||||
|
||||
|
||||
public:
|
||||
~CCalGeometryConfiguration() {}
|
||||
|
||||
static CCalGeometryConfiguration* getInstance();
|
||||
|
||||
int getConstructFlag(const G4String& n) /*const*/;
|
||||
G4int getConstructFlag(const G4String& n) /*const*/;
|
||||
G4String getFileName(const G4String& n) /*const*/;
|
||||
|
||||
CCalGeometryConfTable& getConfTable() {
|
||||
|
||||
@@ -32,25 +32,26 @@
|
||||
|
||||
#include "CCalDetector.hh"
|
||||
|
||||
class CCalHall: public CCalDetector {
|
||||
class CCalHall: public CCalDetector
|
||||
{
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalHall(const G4String &name);
|
||||
virtual ~CCalHall();
|
||||
|
||||
//Get Methods
|
||||
G4String getMaterial() const {return genMaterial;}
|
||||
double getDy_2Hall() const {return dy_2Hall;}
|
||||
double getDx_2Hall() const {return dx_2Hall;}
|
||||
G4String getMaterial() const {return genMaterial;}
|
||||
G4double getDy_2Hall() const {return dy_2Hall;}
|
||||
G4double getDx_2Hall() const {return dx_2Hall;}
|
||||
|
||||
protected:
|
||||
virtual int readFile();
|
||||
virtual G4int readFile();
|
||||
virtual void constructDaughters();
|
||||
|
||||
private:
|
||||
G4String genMaterial; //General material
|
||||
double dy_2Hall; //Half width of the Experimental Hall
|
||||
double dx_2Hall; //Half thickness of the Experimental Hall
|
||||
G4double dy_2Hall; //Half width of the Experimental Hall
|
||||
G4double dx_2Hall; //Half thickness of the Experimental Hall
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,88 +32,89 @@
|
||||
|
||||
#include "CCalDetector.hh"
|
||||
|
||||
class CCalHcal: public CCalDetector {
|
||||
class CCalHcal: public CCalDetector
|
||||
{
|
||||
public:
|
||||
//Constructor and Destructor
|
||||
CCalHcal(const G4String &name);
|
||||
virtual ~CCalHcal();
|
||||
|
||||
//Get Methods
|
||||
G4String getGenMat() const {return genMaterial;}
|
||||
double getDy_2Cal() const {return dy_2Cal;}
|
||||
double getDx_2Cal() const {return dx_2Cal;}
|
||||
double getXposCal() const {return xposCal;}
|
||||
G4String getBoxMat() const {return boxMaterial;}
|
||||
int getNBox() const {return nBox;}
|
||||
double getDy_2Box() const {return dy_2Box;}
|
||||
double getDx_2Box() const {return dx_2Box;}
|
||||
double getWallThickBox() const {return wallThickBox;}
|
||||
double getXposBox(unsigned int i) const {return xposBox[i];}
|
||||
int getNLayerScnt() const {return nLayerScnt;}
|
||||
int getTypeScnt(unsigned int i) const {return typeLayerScnt[i];}
|
||||
int getMotherScnt(unsigned int i) const {return mothLayerScnt[i];}
|
||||
double getXposScnt(unsigned int i) const {return xposLayerScnt[i];}
|
||||
int getNLayerAbs() const {return nLayerAbs;}
|
||||
int getTypeAbs(unsigned int i) const {return typeLayerAbs[i];}
|
||||
int getMotherAbs(unsigned int i) const {return mothLayerAbs[i];}
|
||||
double getXposAbs(unsigned int i) const {return xposLayerAbs[i];}
|
||||
G4String getAbsMat() const {return absMaterial;}
|
||||
int getNAbsorber() const {return nAbsorber;}
|
||||
double getDy_2Abs( ) const {return dy_2Absorber;}
|
||||
double getDx_2Abs(unsigned int i) const {return dx_2Absorber[i];}
|
||||
G4String getScntMat() const {return scntMaterial;}
|
||||
G4String getWrapMat() const {return wrapMaterial;}
|
||||
G4String getPlasMat() const {return plasMaterial;}
|
||||
int getNScintillator() const {return nScintillator;}
|
||||
double getDy_2ScntLay(unsigned int i) const {return dy_2ScntLayer[i];}
|
||||
double getDx_2ScntLay(unsigned int i) const {return dx_2ScntLayer[i];}
|
||||
double getDx_2Wrap(unsigned int i) const {return dx_2Wrapper[i];}
|
||||
double getDx_2FrontP(unsigned int i) const {return dx_2FrontPlastic[i];}
|
||||
double getDx_2BackP(unsigned int i) const {return dx_2BackPlastic[i];}
|
||||
double getDx_2Scnt(unsigned int i) const {return dx_2Scintillator[i];}
|
||||
G4String getGenMat() const {return genMaterial;}
|
||||
G4double getDy_2Cal() const {return dy_2Cal;}
|
||||
G4double getDx_2Cal() const {return dx_2Cal;}
|
||||
G4double getXposCal() const {return xposCal;}
|
||||
G4String getBoxMat() const {return boxMaterial;}
|
||||
G4int getNBox() const {return nBox;}
|
||||
G4double getDy_2Box() const {return dy_2Box;}
|
||||
G4double getDx_2Box() const {return dx_2Box;}
|
||||
G4double getWallThickBox() const {return wallThickBox;}
|
||||
G4double getXposBox(unsigned int i) const {return xposBox[i];}
|
||||
G4int getNLayerScnt() const {return nLayerScnt;}
|
||||
G4int getTypeScnt(unsigned int i) const {return typeLayerScnt[i];}
|
||||
G4int getMotherScnt(unsigned int i) const {return mothLayerScnt[i];}
|
||||
G4double getXposScnt(unsigned int i) const {return xposLayerScnt[i];}
|
||||
G4int getNLayerAbs() const {return nLayerAbs;}
|
||||
G4int getTypeAbs(unsigned int i) const {return typeLayerAbs[i];}
|
||||
G4int getMotherAbs(unsigned int i) const {return mothLayerAbs[i];}
|
||||
G4double getXposAbs(unsigned int i) const {return xposLayerAbs[i];}
|
||||
G4String getAbsMat() const {return absMaterial;}
|
||||
G4int getNAbsorber() const {return nAbsorber;}
|
||||
G4double getDy_2Abs( ) const {return dy_2Absorber;}
|
||||
G4double getDx_2Abs(unsigned int i) const {return dx_2Absorber[i];}
|
||||
G4String getScntMat() const {return scntMaterial;}
|
||||
G4String getWrapMat() const {return wrapMaterial;}
|
||||
G4String getPlasMat() const {return plasMaterial;}
|
||||
G4int getNScintillator() const {return nScintillator;}
|
||||
G4double getDy_2ScntLay(unsigned int i) const {return dy_2ScntLayer[i];}
|
||||
G4double getDx_2ScntLay(unsigned int i) const {return dx_2ScntLayer[i];}
|
||||
G4double getDx_2Wrap(unsigned int i) const {return dx_2Wrapper[i];}
|
||||
G4double getDx_2FrontP(unsigned int i) const {return dx_2FrontPlastic[i];}
|
||||
G4double getDx_2BackP(unsigned int i) const {return dx_2BackPlastic[i];}
|
||||
G4double getDx_2Scnt(unsigned int i) const {return dx_2Scintillator[i];}
|
||||
|
||||
protected:
|
||||
virtual int readFile();
|
||||
virtual G4int readFile();
|
||||
virtual void constructDaughters();
|
||||
|
||||
private:
|
||||
G4String genMaterial; //General material
|
||||
double dy_2Cal; //Half width of the Hcal
|
||||
double dx_2Cal; //Half thickness of the Hcal
|
||||
double xposCal; //Position in mother
|
||||
G4String genMaterial; //General material
|
||||
G4double dy_2Cal; //Half width of the Hcal
|
||||
G4double dx_2Cal; //Half thickness of the Hcal
|
||||
G4double xposCal; //Position in mother
|
||||
|
||||
G4String boxMaterial; //Material of boxes
|
||||
int nBox; //Number of boxes
|
||||
double dy_2Box; //Half width of the Boxes
|
||||
double dx_2Box; //Half thickness of the Boxes
|
||||
double wallThickBox; //Wall thickness of the boxes
|
||||
double* xposBox; //Position in mother
|
||||
G4String boxMaterial; //Material of boxes
|
||||
G4int nBox; //Number of boxes
|
||||
G4double dy_2Box; //Half width of the Boxes
|
||||
G4double dx_2Box; //Half thickness of the Boxes
|
||||
G4double wallThickBox; //Wall thickness of the boxes
|
||||
G4double* xposBox; //Position in mother
|
||||
|
||||
int nLayerScnt; //Number of scintillator layers
|
||||
int* typeLayerScnt; //Layer type
|
||||
int* mothLayerScnt; //Mother type
|
||||
double* xposLayerScnt; //Position in mother
|
||||
G4int nLayerScnt; //Number of scintillator layers
|
||||
G4int* typeLayerScnt; //Layer type
|
||||
G4int* mothLayerScnt; //Mother type
|
||||
G4double* xposLayerScnt; //Position in mother
|
||||
|
||||
int nLayerAbs; //Number of absorber layers
|
||||
int* typeLayerAbs; //Layer type
|
||||
int* mothLayerAbs; //Mother type
|
||||
double* xposLayerAbs; //Position in mother
|
||||
G4int nLayerAbs; //Number of absorber layers
|
||||
G4int* typeLayerAbs; //Layer type
|
||||
G4int* mothLayerAbs; //Mother type
|
||||
G4double* xposLayerAbs; //Position in mother
|
||||
|
||||
G4String absMaterial; //Material of absorbers
|
||||
int nAbsorber; //Number of absorber types
|
||||
double dy_2Absorber; //Half width of the absorbers
|
||||
double* dx_2Absorber; //Half thickness of the absorbers
|
||||
G4String absMaterial; //Material of absorbers
|
||||
G4int nAbsorber; //Number of absorber types
|
||||
G4double dy_2Absorber; //Half width of the absorbers
|
||||
G4double* dx_2Absorber; //Half thickness of the absorbers
|
||||
|
||||
G4String scntMaterial; //Material of Scintillator
|
||||
G4String wrapMaterial; //Material of Wrapper
|
||||
G4String plasMaterial; //Material of plastic cover
|
||||
int nScintillator; //Number of scintillator types
|
||||
double* dy_2ScntLayer; //Half width of scintillator layers
|
||||
double* dx_2ScntLayer; //Half thickness of scintillator layers
|
||||
double* dx_2Wrapper; //Half thickness of wrappers
|
||||
double* dx_2FrontPlastic; //Half thickness of front plastic
|
||||
double* dx_2BackPlastic; //Half thickness of back plastic
|
||||
double* dx_2Scintillator; //Half thickness of scintillators
|
||||
G4String scntMaterial; //Material of Scintillator
|
||||
G4String wrapMaterial; //Material of Wrapper
|
||||
G4String plasMaterial; //Material of plastic cover
|
||||
G4int nScintillator; //Number of scintillator types
|
||||
G4double* dy_2ScntLayer; //Half width of scintillator layers
|
||||
G4double* dx_2ScntLayer; //Half thickness of scintillator layers
|
||||
G4double* dx_2Wrapper; //Half thickness of wrappers
|
||||
G4double* dx_2FrontPlastic; //Half thickness of front plastic
|
||||
G4double* dx_2BackPlastic; //Half thickness of back plastic
|
||||
G4double* dx_2Scintillator; //Half thickness of scintillators
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,14 +28,15 @@
|
||||
// Description: Defines numbering schema for the Hadron Calorimeter
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalHcalOrganization_h
|
||||
#define CCalHcalOrganization_h
|
||||
#define CCalHcalOrganization_h 1
|
||||
|
||||
#include "CCalVOrganization.hh"
|
||||
|
||||
class CCalHcalOrganization: public CCalVOrganization{
|
||||
class CCalHcalOrganization: public CCalVOrganization
|
||||
{
|
||||
|
||||
public:
|
||||
CCalHcalOrganization(){};
|
||||
CCalHcalOrganization(){}
|
||||
~CCalHcalOrganization();
|
||||
|
||||
virtual unsigned int GetUnitID(const G4Step* aStep) const ;
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define CCalHit_h 1
|
||||
|
||||
#include <iostream>
|
||||
#include "CLHEP/Vector/ThreeVector.h"
|
||||
#include <CLHEP/Vector/ThreeVector.h>
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
~CCalHit();
|
||||
CCalHit(const CCalHit &right);
|
||||
const CCalHit& operator=(const CCalHit &right);
|
||||
G4bool operator==(const CCalHit &){return 0;}
|
||||
G4bool operator==(const CCalHit &){return false;}
|
||||
|
||||
void print();
|
||||
|
||||
@@ -68,32 +68,32 @@ public:
|
||||
CLHEP::Hep3Vector getEntry() const;
|
||||
void setEntry(CLHEP::Hep3Vector xyz);
|
||||
|
||||
double getIncidentEnergy() const;
|
||||
void setIncidentEnergy (double e);
|
||||
G4double getIncidentEnergy() const;
|
||||
void setIncidentEnergy (G4double e);
|
||||
|
||||
int getTrackID() const;
|
||||
void setTrackID (int i);
|
||||
G4int getTrackID() const;
|
||||
void setTrackID (G4int i);
|
||||
|
||||
unsigned int getUnitID() const;
|
||||
void setUnitID (unsigned int i);
|
||||
|
||||
double getTimeSlice() const;
|
||||
void setTimeSlice(double d);
|
||||
int getTimeSliceID() const;
|
||||
G4double getTimeSlice() const;
|
||||
void setTimeSlice(G4double d);
|
||||
G4int getTimeSliceID() const;
|
||||
|
||||
double getEnergyDeposit() const;
|
||||
void setEnergyDeposit(const double e);
|
||||
G4double getEnergyDeposit() const;
|
||||
void setEnergyDeposit(const G4double e);
|
||||
void addEnergyDeposit(const CCalHit& aHit);
|
||||
void addEnergyDeposit(const double e);
|
||||
void addEnergyDeposit(const G4double e);
|
||||
|
||||
private:
|
||||
|
||||
CLHEP::Hep3Vector entry; // Entry point
|
||||
double theIncidentEnergy; // Energy of the primary particle
|
||||
int theTrackID; // Identification number of the primary particle
|
||||
unsigned int theUnitID; // Calorimeter Unit Number
|
||||
double theTimeSlice; // Time Slice Identification
|
||||
double theEnergyDeposit; // Cumulated Energy deposit
|
||||
CLHEP::Hep3Vector entry; // Entry point
|
||||
G4double theIncidentEnergy; // Energy of the primary particle
|
||||
G4int theTrackID; // Identification number of the primary particle
|
||||
unsigned int theUnitID; // Calorimeter Unit Number
|
||||
G4double theTimeSlice; // Time Slice Identification
|
||||
G4double theEnergyDeposit; // Cumulated Energy deposit
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -29,21 +29,22 @@
|
||||
// The field is assumed to be uniform.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalMagneticField_H
|
||||
#define CCalMagneticField_H
|
||||
#define CCalMagneticField_H 1
|
||||
|
||||
#include "G4UniformMagField.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
class G4FieldManager;
|
||||
|
||||
class CCalMagneticField: public G4MagneticField {
|
||||
class CCalMagneticField: public G4MagneticField
|
||||
{
|
||||
public:
|
||||
CCalMagneticField(const G4String &name);
|
||||
~CCalMagneticField();
|
||||
|
||||
// Access functions
|
||||
void MagneticField(const double Point[3], double Bfield[3]) const;
|
||||
void MagneticField(const G4double Point[3], G4double Bfield[3]) const;
|
||||
CLHEP::Hep3Vector MagneticField(const CLHEP::Hep3Vector Point) const;
|
||||
virtual void GetFieldValue(const double Point[3], double* Bfield) const;
|
||||
virtual void GetFieldValue(const G4double Point[3], G4double* Bfield) const;
|
||||
G4double GetConstantFieldvalue() const {return fval;}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
#include <iostream>
|
||||
#include "globals.hh"
|
||||
|
||||
class CCalMaterial {
|
||||
class CCalMaterial
|
||||
{
|
||||
|
||||
friend std::ostream& operator<<(std::ostream&, const CCalMaterial&);
|
||||
|
||||
@@ -41,18 +42,18 @@ public:
|
||||
enum FractionType {FTWeight, FTVolume};
|
||||
|
||||
//Constructors and destructors
|
||||
CCalMaterial(G4String mat, double dens, int nelem,
|
||||
CCalMaterial** constituents, double* weights,
|
||||
FractionType=FTWeight);
|
||||
CCalMaterial(G4String mat, G4double dens, G4int nelem,
|
||||
CCalMaterial** constituents, G4double* weights,
|
||||
FractionType=FTWeight);
|
||||
CCalMaterial(const CCalMaterial&);
|
||||
virtual ~CCalMaterial();
|
||||
|
||||
//Get methods
|
||||
G4String Name() const {return name;} //Material name.
|
||||
double Density() const {return density;} //Density in g/cm3.
|
||||
int NElements() const {return nElem;} //Number of Elements.
|
||||
G4String Element(int i) const {return theElements[i];} //Should be protected.
|
||||
double Weight(int i) const {return theWeights[i];} //Should be protected.
|
||||
G4String Name() const {return name;} //Material name
|
||||
G4double Density() const {return density;} //Density in g/cm3
|
||||
G4int NElements() const {return nElem;} //Number of Elements
|
||||
G4String Element(G4int i) const {return theElements[i];} //Should be protected
|
||||
G4double Weight(G4int i) const {return theWeights[i];} //Should be protected
|
||||
|
||||
//Operators
|
||||
G4bool operator==(const CCalMaterial&) const; //Compares ONLY names
|
||||
@@ -62,15 +63,15 @@ public:
|
||||
protected:
|
||||
CCalMaterial(){} //Default constructor
|
||||
void computeDensity(int nconst,
|
||||
CCalMaterial** constituents, double* weights,
|
||||
FractionType ft);
|
||||
CCalMaterial** constituents, double* weights,
|
||||
FractionType ft);
|
||||
void closeMaterial(); //Closes material construction.
|
||||
|
||||
protected:
|
||||
G4String name; //Material name
|
||||
double density; //Density in g/cm3
|
||||
int nElem; //Number of constituents.
|
||||
G4double density; //Density in g/cm3
|
||||
G4int nElem; //Number of constituents.
|
||||
G4String* theElements; //Basic constituents
|
||||
double* theWeights; //Elements' weight fractions
|
||||
G4double* theWeights; //Elements' weight fractions
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
G4double, G4double );
|
||||
//Adds a new CCal Material to the list and returns a G4Material.
|
||||
G4Material* addMaterial(const G4String& nam, G4double density,
|
||||
G4int nconst, G4String mats[], G4double prop[],
|
||||
MatDescription md=byWeight);
|
||||
G4int nconst, G4String mats[], G4double prop[],
|
||||
MatDescription md=byWeight);
|
||||
|
||||
void readElements (const G4String&);
|
||||
void readMaterials(const G4String&);
|
||||
@@ -82,9 +82,8 @@ private:
|
||||
|
||||
//Adds a CCalMaterial to the list. Used by readMaterials and addMaterial.
|
||||
CCalMaterial* addCCalMaterial(const G4String& nam, G4double density,
|
||||
G4int nconst, G4String mats[], G4double prop[],
|
||||
MatDescription md=byWeight);
|
||||
|
||||
G4int nconst, G4String mats[], G4double prop[],
|
||||
MatDescription md=byWeight);
|
||||
|
||||
private:
|
||||
static CCalMaterialFactory* instance;
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef CCalPrimaryGeneratorAction_h
|
||||
#define CCalPrimaryGeneratorAction_h 1
|
||||
|
||||
@@ -118,6 +117,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ class CCalPrimaryGeneratorAction;
|
||||
#include "G4UIcmdWithADouble.hh"
|
||||
#include "G4UIcmdWithAnInteger.hh"
|
||||
|
||||
class CCalPrimaryGeneratorMessenger: public G4UImessenger {
|
||||
class CCalPrimaryGeneratorMessenger: public G4UImessenger
|
||||
{
|
||||
public:
|
||||
CCalPrimaryGeneratorMessenger(CCalPrimaryGeneratorAction* myGun);
|
||||
~CCalPrimaryGeneratorMessenger();
|
||||
@@ -66,4 +67,3 @@ private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -52,9 +52,9 @@ public:
|
||||
|
||||
G4RotationMatrix* findMatrix(const G4String&);
|
||||
G4RotationMatrix* AddMatrix(const G4String& name,
|
||||
G4double th1, G4double phi1, //Axis angles
|
||||
G4double th2, G4double phi2, //in rads
|
||||
G4double th3, G4double phi3); //
|
||||
G4double th1, G4double phi1, //Axis angles
|
||||
G4double th2, G4double phi2, //in rads
|
||||
G4double th3, G4double phi3); //
|
||||
|
||||
private:
|
||||
CCalRotationMatrixFactory();
|
||||
|
||||
@@ -27,15 +27,16 @@
|
||||
// File: CCalRunAction.hh
|
||||
// Description: A class for providing user actions at begin and end of run
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCalRunAction_h
|
||||
#define CCalRunAction_h
|
||||
#define CCalRunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
|
||||
class G4Run;
|
||||
|
||||
class CCalRunAction: public G4UserRunAction{
|
||||
|
||||
class CCalRunAction: public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
CCalRunAction(){};
|
||||
virtual ~CCalRunAction(){};
|
||||
@@ -48,8 +49,6 @@ public:
|
||||
|
||||
private:
|
||||
G4int numberOfTimeSlices;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
|
||||
typedef G4String nameType;
|
||||
|
||||
class CCalSDList{
|
||||
class CCalSDList
|
||||
{
|
||||
private:
|
||||
CCalSDList();
|
||||
~CCalSDList();
|
||||
@@ -50,11 +51,11 @@ public:
|
||||
void addCalo(nameType name);
|
||||
void addTracker(nameType name);
|
||||
|
||||
nameType getCaloSDName(int i);
|
||||
nameType getTrackerSDName(int i);
|
||||
nameType getCaloSDName(G4int i);
|
||||
nameType getTrackerSDName(G4int i);
|
||||
|
||||
int getNumberOfCaloSD();
|
||||
int getNumberOfTrackerSD();
|
||||
G4int getNumberOfCaloSD();
|
||||
G4int getNumberOfTrackerSD();
|
||||
|
||||
private:
|
||||
static CCalSDList* theList;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// from the map of logical volumes which are potentially sensitive
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalSensAssign_h
|
||||
#define CCalSensAssign_h
|
||||
#define CCalSensAssign_h 1
|
||||
|
||||
#include "CCalVOrganization.hh"
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
#include "globals.hh"
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
class CCalSensAssign {
|
||||
|
||||
class CCalSensAssign
|
||||
{
|
||||
public:
|
||||
~CCalSensAssign(){};
|
||||
~CCalSensAssign(){}
|
||||
static CCalSensAssign* getInstance();
|
||||
bool assign();
|
||||
bool stackingAction();
|
||||
bool addCaloSD(G4String name, CCalVOrganization* numberingScheme);
|
||||
G4bool assign();
|
||||
G4bool stackingAction();
|
||||
G4bool addCaloSD(G4String name, CCalVOrganization* numberingScheme);
|
||||
|
||||
private:
|
||||
CCalSensAssign();
|
||||
|
||||
@@ -35,23 +35,21 @@
|
||||
#include <map>
|
||||
#include "CCalutils.hh"
|
||||
|
||||
class CCalSensitiveConfiguration {
|
||||
|
||||
class CCalSensitiveConfiguration
|
||||
{
|
||||
struct GCInfo {
|
||||
G4String FileName;
|
||||
int SensitiveFlag;
|
||||
G4int SensitiveFlag;
|
||||
};
|
||||
|
||||
typedef std::map<G4String, GCInfo, std::less<G4String> > CCalSensitiveConfTable;
|
||||
typedef std::map<G4String, GCInfo, std::less<G4String> >::iterator CCalSensitiveConfIterator;
|
||||
|
||||
typedef std::map<G4String, GCInfo, std::less<G4String> > CCalSensitiveConfTable;
|
||||
|
||||
public:
|
||||
~CCalSensitiveConfiguration() {}
|
||||
|
||||
static CCalSensitiveConfiguration* getInstance();
|
||||
|
||||
int getSensitiveFlag(const G4String& n) /*const*/;
|
||||
G4int getSensitiveFlag(const G4String& n) /*const*/;
|
||||
G4String getFileName(const G4String& n) /*const*/;
|
||||
|
||||
private:
|
||||
|
||||
@@ -38,20 +38,20 @@
|
||||
|
||||
typedef std::multimap< G4String, G4LogicalVolume*, std::less<G4String> > mmslv;
|
||||
|
||||
class CCalSensitiveDetectors {
|
||||
|
||||
class CCalSensitiveDetectors
|
||||
{
|
||||
public:
|
||||
~CCalSensitiveDetectors(){};
|
||||
std::vector<G4LogicalVolume*> getVolumes (const G4String& name, bool exists = 0);
|
||||
std::vector<G4LogicalVolume*> getVolumes (const G4String& name,
|
||||
G4bool exists = false);
|
||||
void registerVolume (const G4String& name, G4LogicalVolume*);
|
||||
bool setSensitive(const G4String& string, G4VSensitiveDetector* sens);
|
||||
G4bool setSensitive(const G4String& string, G4VSensitiveDetector* sens);
|
||||
static CCalSensitiveDetectors* getInstance();
|
||||
private:
|
||||
CCalSensitiveDetectors(){};
|
||||
static CCalSensitiveDetectors* theInstance;
|
||||
// logical volume container: name, G4LogicalVolume*
|
||||
mmslv theLVs;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
class CCaloSD;
|
||||
|
||||
class CCalStackingAction : public G4UserStackingAction {
|
||||
|
||||
class CCalStackingAction : public G4UserStackingAction
|
||||
{
|
||||
friend class CCalSensAssign;
|
||||
|
||||
public:
|
||||
|
||||
@@ -47,10 +47,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
G4float LateralProfile[70];
|
||||
G4float LateralProfile[70];
|
||||
G4float timeDeposit[200];
|
||||
G4int timeHistoMaxBin;
|
||||
|
||||
G4int timeHistoMaxBin;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,20 +28,20 @@
|
||||
// Description: Base class for definition of sensitive unit numbering schema
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef CCalVOrganization_h
|
||||
#define CCalVOrganization_h
|
||||
#define CCalVOrganization_h 1
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "CCaloOrganization.hh"
|
||||
|
||||
class CCalVOrganization {
|
||||
|
||||
class CCalVOrganization
|
||||
{
|
||||
public:
|
||||
CCalVOrganization(){};
|
||||
virtual ~CCalVOrganization(){};
|
||||
|
||||
CCalVOrganization(){}
|
||||
virtual ~CCalVOrganization(){}
|
||||
|
||||
virtual unsigned int GetUnitID(const G4Step* aStep) const = 0;
|
||||
virtual int Levels(const G4Step*) const;
|
||||
virtual void DetectorLevel(const G4Step*, int&, int*, G4String*) const;
|
||||
virtual G4int Levels(const G4Step*) const;
|
||||
virtual void DetectorLevel(const G4Step*, G4int&, G4int*, G4String*) const;
|
||||
|
||||
protected:
|
||||
CCaloOrganization theOrg;
|
||||
|
||||
@@ -32,36 +32,35 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#if __SUNPRO_CC==0x420
|
||||
typedef G4bool bool;
|
||||
#endif
|
||||
|
||||
class CCalVisualisable {
|
||||
class CCalVisualisable
|
||||
{
|
||||
public:
|
||||
|
||||
//Here we define the different type of volumes we consider.
|
||||
enum visType {Sensitive=0,
|
||||
Electronics=1,
|
||||
Support=2,
|
||||
Cable=3,
|
||||
Absorber=4,
|
||||
OtherServices=5,
|
||||
PseudoVolumes=6,
|
||||
TotalVisTypes=7,
|
||||
Undefined=-1};
|
||||
Electronics=1,
|
||||
Support=2,
|
||||
Cable=3,
|
||||
Absorber=4,
|
||||
OtherServices=5,
|
||||
PseudoVolumes=6,
|
||||
TotalVisTypes=7,
|
||||
Undefined=-1};
|
||||
|
||||
private:
|
||||
|
||||
//This class groups the important visualization parameters.
|
||||
class visParameters {
|
||||
public:
|
||||
visParameters(bool v=false, double r=1,double g=1,double b=1, bool w=true):
|
||||
visibility(v),rColor(r),gColor(g),bColor(b),wireframe(w) {}
|
||||
bool visibility;
|
||||
double rColor;
|
||||
double gColor;
|
||||
double bColor;
|
||||
bool wireframe;
|
||||
class visParameters
|
||||
{
|
||||
public:
|
||||
visParameters(G4bool v=false, G4double r=1,G4double g=1,
|
||||
G4double b=1, G4bool w=true)
|
||||
: visibility(v),rColor(r),gColor(g),bColor(b),wireframe(w) {}
|
||||
G4bool visibility;
|
||||
G4double rColor;
|
||||
G4double gColor;
|
||||
G4double bColor;
|
||||
G4bool wireframe;
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -71,42 +70,39 @@ public:
|
||||
virtual ~CCalVisualisable() {}
|
||||
|
||||
//Reads this object from file
|
||||
bool readFile(G4String file);
|
||||
G4bool readFile(G4String file);
|
||||
|
||||
//Sets visibility to true for Sensitive and to false otherwise.
|
||||
void setDefault();
|
||||
|
||||
//Get & Set methods.
|
||||
bool isVisible (visType v) const {return theParameters[v].visibility;}
|
||||
void setVisible(visType v, bool flag=true){theParameters[v].visibility=flag;}
|
||||
G4bool isVisible (visType v) const
|
||||
{return theParameters[v].visibility;}
|
||||
void setVisible(visType v, G4bool flag=true)
|
||||
{theParameters[v].visibility=flag;}
|
||||
|
||||
double colorRed (visType v) const {return theParameters[v].rColor;}
|
||||
double colorGreen(visType v) const {return theParameters[v].gColor;}
|
||||
double colorBlue (visType v) const {return theParameters[v].bColor;}
|
||||
void setColorRed (visType v, double r) {theParameters[v].rColor=r;}
|
||||
void setColorGreen(visType v, double g) {theParameters[v].gColor=g;}
|
||||
void setColorBlue (visType v, double b) {theParameters[v].bColor=b;}
|
||||
void setColor(visType v, double r, double g, double b);
|
||||
G4double colorRed (visType v) const {return theParameters[v].rColor;}
|
||||
G4double colorGreen(visType v) const {return theParameters[v].gColor;}
|
||||
G4double colorBlue (visType v) const {return theParameters[v].bColor;}
|
||||
void setColorRed (visType v, G4double r) {theParameters[v].rColor=r;}
|
||||
void setColorGreen(visType v, G4double g) {theParameters[v].gColor=g;}
|
||||
void setColorBlue (visType v, G4double b) {theParameters[v].bColor=b;}
|
||||
void setColor(visType v, G4double r, G4double g, G4double b);
|
||||
|
||||
bool isWireFrame (visType v) const {return theParameters[v].wireframe;}
|
||||
void setWireFrame(visType v, bool wf=true){theParameters[v].wireframe=wf;}
|
||||
G4bool isWireFrame (visType v) const {return theParameters[v].wireframe;}
|
||||
void setWireFrame(visType v, G4bool wf=true){theParameters[v].wireframe=wf;}
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
//Read this object from visFile
|
||||
static void setPath();
|
||||
bool readFile();
|
||||
G4bool readFile();
|
||||
|
||||
private:
|
||||
static const char* pathName; //Path in which to look for files
|
||||
G4String visFile; //File with visualization info
|
||||
visParameters theParameters[TotalVisTypes]; //Visualisation parameters
|
||||
|
||||
double checkColorRange(double color, char type) const;
|
||||
G4double checkColorRange(G4double color, char type) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,33 +30,35 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCaloOrganization_h
|
||||
#define CCaloOrganization_h
|
||||
#define CCaloOrganization_h 1
|
||||
|
||||
#include <map>
|
||||
#include "globals.hh"
|
||||
|
||||
class CCaloOrganization{
|
||||
|
||||
class CCaloOrganization
|
||||
{
|
||||
public:
|
||||
CCaloOrganization(){};
|
||||
virtual ~CCaloOrganization(){};
|
||||
CCaloOrganization(){}
|
||||
virtual ~CCaloOrganization(){}
|
||||
|
||||
public:
|
||||
unsigned int packindex(int det, int z, int eta, int phi) const;
|
||||
unsigned int packindex(int det, int depth, int z, int eta, int phi) const;
|
||||
void unpackindex(const unsigned int& idx, int& det, int& z, int& eta, int& phi) const;
|
||||
void unpackindex(const unsigned int& idx, int& det, int& depth, int& z, int& eta, int& phi) const;
|
||||
unsigned int packindex(G4int det, G4int z,
|
||||
G4int eta, G4int phi) const;
|
||||
unsigned int packindex(G4int det, G4int depth, G4int z,
|
||||
G4int eta, G4int phi) const;
|
||||
void unpackindex(const unsigned int& idx, G4int& det, G4int& z,
|
||||
G4int& eta, G4int& phi) const;
|
||||
void unpackindex(const unsigned int& idx, G4int& det, G4int& depth, G4int& z,
|
||||
G4int& eta, G4int& phi) const;
|
||||
|
||||
public:
|
||||
|
||||
// additional tool:
|
||||
int getUnitWithMaxEnergy(std::map<int,float,std::less<int> >& themap);
|
||||
|
||||
float energyInMatrix(int nCellInEta, int nCellInPhi,
|
||||
int crystalWithMaxEnergy,
|
||||
std::map<int,float,std::less<int> >& themap);
|
||||
|
||||
G4int getUnitWithMaxEnergy(std::map<G4int,G4float,std::less<G4int> >& themap);
|
||||
|
||||
G4float energyInMatrix(G4int nCellInEta, G4int nCellInPhi,
|
||||
G4int crystalWithMaxEnergy,
|
||||
std::map<G4int,G4float,std::less<G4int> >& themap);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -56,9 +56,11 @@ class CCalVOrganization;
|
||||
|
||||
//#define debug
|
||||
|
||||
class CCaloSD : public G4VSensitiveDetector {
|
||||
class CCaloSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
CCaloSD(G4String aSDname, CCalVOrganization* numberingScheme);
|
||||
virtual ~CCaloSD();
|
||||
|
||||
@@ -71,8 +73,8 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
void SetPrimaryID(int i) {PrimaryID = i;}
|
||||
int GetPrimaryID( ) {return PrimaryID;}
|
||||
void SetPrimaryID(G4int i) {PrimaryID = i;}
|
||||
G4int GetPrimaryID( ) {return PrimaryID;}
|
||||
void SetOrganization(CCalVOrganization* org);
|
||||
|
||||
private:
|
||||
@@ -93,7 +95,7 @@ private:
|
||||
// unit ID (cristal/fiber/scintillator) and the Time slice ID.
|
||||
|
||||
G4ThreeVector EntrancePoint;
|
||||
float IncidentEnergy;
|
||||
G4float IncidentEnergy;
|
||||
G4int PrimID ; //@@ ID of the primary particle.
|
||||
|
||||
G4int HCID;
|
||||
@@ -111,13 +113,11 @@ private:
|
||||
|
||||
const G4StepPoint* PreStepPoint;
|
||||
const G4StepPoint* PostStepPoint;
|
||||
float EdepositEM, EdepositEHAD;
|
||||
G4float EdepositEM, EdepositEHAD;
|
||||
G4ThreeVector HitPoint;
|
||||
|
||||
CCalVOrganization* theDescription;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,9 +34,8 @@
|
||||
#include <fstream>
|
||||
#include "globals.hh"
|
||||
|
||||
|
||||
G4String operator+(const G4String&, const int);
|
||||
G4String operator+(const G4String&, const double);
|
||||
G4String operator+(const G4String&, const G4int);
|
||||
G4String operator+(const G4String&, const G4double);
|
||||
// "number " + i = "number i"
|
||||
|
||||
std::ifstream& readName(std::ifstream&, G4String&);
|
||||
@@ -52,9 +51,8 @@ std::ostream& tab(std::ostream&);
|
||||
std::istream& jump(std::istream&);
|
||||
// It ignores character until the end of line.
|
||||
|
||||
bool openGeomFile(std::ifstream& is, const G4String& pathname,
|
||||
const G4String& filename);
|
||||
G4bool openGeomFile(std::ifstream& is, const G4String& pathname,
|
||||
const G4String& filename);
|
||||
// It opens the geometry file, either locally (if it exists) or "remotely".
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user