#include <OpParamAction.h>
Definition at line 95 of file OpParamAction.h.
larg4::OverlaidWireplanesAction::OverlaidWireplanesAction |
( |
std::vector< std::vector< double > > |
InputVectors, |
|
|
int |
Orientation |
|
) |
| |
Definition at line 79 of file OpParamAction.cxx.
82 G4ThreeVector WireBasis1, WireBasis2;
87 WireBasis1 =G4ThreeVector(0,1,0);
88 WireBasis2 =G4ThreeVector(0,0,1);
90 else if(Orientation==1)
93 WireBasis1 =G4ThreeVector(1,0,0);
94 WireBasis2 =G4ThreeVector(0,0,1);
96 else if(Orientation==2)
99 WireBasis1 =G4ThreeVector(0,1,0);
100 WireBasis2 =G4ThreeVector(0,0,1);
104 throw cet::exception(
"OpParamAction") <<
"Unrecognized wireplane orientation. Options are 1=Xdrift, 2=Ydrift, 3=Zdrift\n";
106 for(
size_t i=0; i!=InputVectors.size(); ++i)
108 if(InputVectors.at(i).size()!=3)
110 throw cet::exception(
"OpParamAction") <<
"Unrecognized wireplane parameter format. Expected vector(3)'s with v[0] = wire angle, v[1] = wire pitch, v[2] = wire diameter\n";
114 double theta = InputVectors[i][0]*3.142/180.;
115 fWireDirections.push_back(cos(theta)*WireBasis1 + sin(theta)*WireBasis2);
116 fDPRatios.push_back(InputVectors[i][2]/InputVectors[i][1]);
std::vector< double > fDPRatios
std::vector< G4ThreeVector > fWireDirections
G4ThreeVector fPlaneNormal
larg4::OverlaidWireplanesAction::~OverlaidWireplanesAction |
( |
| ) |
|
double larg4::OverlaidWireplanesAction::GetAttenuationFraction |
( |
G4ThreeVector |
PhotonDirection, |
|
|
G4ThreeVector |
PhotonPosition |
|
) |
| |
|
virtual |
Reimplemented from larg4::OpParamAction.
Definition at line 131 of file OpParamAction.cxx.
134 double AttenFraction=1.;
141 double CosTheta = (ProjDirection.mag() > 0 ?
std::abs(
fPlaneNormal.dot(ProjDirection))/ProjDirection.mag() : 1.0);
145 AttenFraction *= (1.0 -
fDPRatios.at(i) / CosTheta);
147 return AttenFraction;
std::vector< double > fDPRatios
std::vector< G4ThreeVector > fWireDirections
G4ThreeVector fPlaneNormal
std::vector<double> larg4::OverlaidWireplanesAction::fDPRatios |
|
private |
G4ThreeVector larg4::OverlaidWireplanesAction::fPlaneNormal |
|
private |
std::vector<G4ThreeVector> larg4::OverlaidWireplanesAction::fWireDirections |
|
private |
The documentation for this class was generated from the following files: