Commit 9d0e671e authored by adrien-matta's avatar adrien-matta
Browse files

* Progress on nptool-wizard

parent de4bfabc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GeneralTarget
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%0.2mg/cm2
Target
THICKNESS= 0.01
RADIUS= 5
THICKNESS= 10
RADIUS= 20
MATERIAL= CD2
ANGLE= 0
X= 0
Y= 0
Z= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Sharc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Upstream CD
SharcQQQ
Z= -71
R= 0
Phi= 0
ThicknessDector= 500
SharcQQQ
Z= -71
R= 0
Phi= 90
ThicknessDector= 500
SharcQQQ
Z= -71
R= 0
Phi= 180
ThicknessDector= 500
SharcQQQ
Z= -71
R= 0
Phi= 270
ThicknessDector= 500
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Upstream Box
SharcBOX
Z= -28.4
ThicknessDector1= 500
ThicknessDector2= 500
ThicknessDector3= 500
ThicknessDector4= 500
ThicknessPAD1= 0
ThicknessPAD2= 0
ThicknessPAD3= 0
ThicknessPAD4= 0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Down Stream Box
SharcBOX
Z= 31.4
ThicknessDector1= 140
ThicknessDector2= 140
ThicknessDector3= 140
ThicknessDector4= 140
ThicknessPAD1= 1000
ThicknessPAD2= 1000
ThicknessPAD3= 1000
ThicknessPAD4= 1000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Downstream CD
SharcQQQ
Z= 67
R= 0
Phi= 0
ThicknessDector= 500
SharcQQQ
Z= 67
R= 0
Phi= 90
ThicknessDector= 500
SharcQQQ
Z= 67
R= 0
Phi= 180
ThicknessDector= 500
SharcQQQ
Z= 67
R= 0
Phi= 270
ThicknessDector= 500
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Plastic
DETECTORNAME
X= 0
Y= 0
Z= 400
Thickness= 0.025
Z= 350
Thickness= 30
Shape= Square
Height= 40
Height= 70
Width= 40
Scintillator= BC400
LeadThickness= 0.09
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
This diff is collapsed.
#ifndef DETECTORNAME_h
#define DETECTORNAME_h 1
/*****************************************************************************
* Copyright (C) 2009-XYEARX this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: XAUTHORX contact address: XMAILX *
* *
* Creation Date : XMONTHX XYEARX *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class describe DETECTORNAME simulation *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
*****************************************************************************/
// C++ header
#include <string>
#include <vector>
// G4 header defining G4 types
#include "globals.hh"
// G4 headers
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "G4LogicalVolume.hh"
#include "G4MultiFunctionalDetector.hh"
// NPTool header
#include "NPSVDetector.hh"
#include "TDETECTORNAMEData.h"
using namespace std;
using namespace CLHEP;
class DETECTORNAME : public NPS::VDetector
{
////////////////////////////////////////////////////
/////// Default Constructor and Destructor /////////
////////////////////////////////////////////////////
public:
DETECTORNAME() ;
virtual ~DETECTORNAME() ;
////////////////////////////////////////////////////
/////// Specific Function of this Class ///////////
////////////////////////////////////////////////////
public:
// Cylindric plastic
void AddDETECTORNAME( G4double R,
G4double Theta,
G4double Phi,
G4double Thickness,
G4double Radius,
G4String Scintillator);
// Squared DETECTORNAME
void AddDETECTORNAME( G4double R,
G4double Theta,
G4double Phi,
G4double Height,
G4double Width,
G4double Thickness,
G4String Scintillator);
void VolumeMaker(G4ThreeVector Det_pos, int DetNumber,G4LogicalVolume* world) ;
////////////////////////////////////////////////////
////// Inherite from NPS::VDetector class /////////
////////////////////////////////////////////////////
public:
// Read stream at Configfile to pick-up parameters of detector (Position,...)
// Called in DetecorConstruction::ReadDetextorConfiguration Method
void ReadConfiguration(string Path) ;
// Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method
void ConstructDetector(G4LogicalVolume* world) ;
// Add Detector branch to the EventTree.
// Called After DetecorConstruction::AddDetector Method
void InitializeRootOutput() ;
// Read sensitive part and fill the Root tree.
// Called at in the EventAction::EndOfEventAvtion
void ReadSensitive(const G4Event* event) ;
public: // Scorer
// Initialize all Scorer used by the MUST2Array
void InitializeScorers() ;
// Associated Scorer
G4MultiFunctionalDetector* m_DETECTORNAMEScorer ;
////////////////////////////////////////////////////
///////////Event class to store Data////////////////
////////////////////////////////////////////////////
private:
TDETECTORNAMEData* m_Event ;
////////////////////////////////////////////////////
///////////////Private intern Data//////////////////
////////////////////////////////////////////////////
private: // Geometry
vector<double> m_DETECTORNAME_Thickness ;
vector<double> m_DETECTORNAME_Radius ; // cylindrical shape
vector<double> m_DETECTORNAME_Height ; // squared shape
vector<double> m_DETECTORNAME_Width ; // squared shape
// Used for By Angle Definition
vector<G4double> m_R;
vector<G4double> m_Theta;
vector<G4double> m_Phi;
// Used for By Position Definition
vector<G4double> m_X;
vector<G4double> m_Y;
vector<G4double> m_Z;
// Scintillator type
vector<G4String> m_Scintillator ;
// Needed for dynamic loading of the library
public:
static NPS::VDetector* Construct();
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment