12 #include "CLHEP/Units/GlobalSystemOfUnits.h"
13 #include "CLHEP/Units/GlobalPhysicalConstants.h"
27 DDValue ddv1(attribute,value,0);
39 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: " << nBinAtt <<
" attL ";
40 for (
int it=0; it<
nBinAtt; it++)
41 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: attL[" << it <<
"] = "
42 <<
attL[it]*cm <<
"(1/cm)";
46 std::vector<double> nvec =
getDDDArray(
"lambLim",sv,nb);
47 lambLim[0] =
static_cast<int>(nvec[0]);
48 lambLim[1] =
static_cast<int>(nvec[1]);
55 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: " << nb <<
" Long Fibre Length";
56 for (
int it=0; it<nb; it++)
57 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: longFL[" << it <<
"] = "
61 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: " << nb <<
" Short Fibre Length";
62 for (
int it=0; it<nb; it++)
63 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: shortFL[" << it <<
"] = "
66 edm::LogError(
"FastCalorimetry") <<
"HFFibre: cannot get filtered "
67 <<
" view for " << attribute <<
" matching "
70 <<
"cannot match " << attribute <<
" to " << name <<
"\n";
74 attribute =
"ReadOutName";
77 DDValue ddv2(attribute,value,0);
88 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: " << nb <<
" gpar (cm)";
89 for (
int i=0;
i<nb;
i++)
90 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: gpar[" <<
i <<
"] = "
91 <<
gpar[
i]/cm <<
" cm";
97 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre: radius[" <<
i <<
"] = "
100 edm::LogError(
"FastCalorimetry") <<
"HFFibre: cannot get filtered "
101 <<
" view for " << attribute <<
" matching "
104 <<
"cannot match " << attribute <<
" to " << name <<
"\n";
119 double att =
attL[
j];
121 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre::attLength for Lambda " << lambda
122 <<
" index " << i <<
" " << j <<
" Att. Length "
130 double zFibre =
zShift(point, depth, fromEndAbs);
133 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre::tShift for point " << point
134 <<
" ( depth = " << depth <<
", traversed length = "
135 << zFibre/cm <<
" cm) = " << time/ns <<
" ns";
143 double hR =
sqrt((point.x())*(point.x())+(point.y())*(point.y()));
145 double length = 250*cm;
146 if (fromEndAbs < 0) {
147 zFibre = 0.5*
gpar[1] - point.z();
158 if (fromEndAbs > 0) {
161 double zz = 0.5*
gpar[1] + point.z();
164 if (depth == 2) zFibre +=
gpar[0];
168 edm::LogInfo(
"FastCalorimetry") <<
"HFFibre::zShift for point " << point
169 <<
" (R = " << hR/cm <<
" cm, Index = " << ieta
170 <<
", depth = " << depth <<
", Fibre Length = "
171 << length/cm <<
" cm = " << zFibre/cm
182 LogDebug(
"FastCalorimetry") <<
"HFFibre:getDDDArray called for " << str
183 <<
" with nMin " << nmin;
188 LogDebug(
"FastCalorimetry") <<
"HFFibre:getDDDArray value " <<
value;
190 const std::vector<double> & fvec = value.
doubles();
191 int nval = fvec.size();
194 edm::LogError(
"FastCalorimetry") <<
"HFFibre : # of " << str <<
" bins "
195 << nval <<
" < " << nmin <<
" ==> illegal";
197 <<
"nval < nmin for array " << str <<
"\n";
200 if (nval < 1 && nmin != 0) {
201 edm::LogError(
"FastCalorimetry") <<
"HFFibre : # of " << str <<
" bins "
202 << nval <<
" < 1 ==> illegal (nmin="
205 <<
"nval < 1 for array " << str <<
"\n";
212 edm::LogError(
"FastCalorimetry") <<
"HFFibre : cannot get array " << str;
214 <<
"cannot get array " << str <<
"\n";
216 std::vector<double> fvec;
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
void addFilter(const DDFilter &, log_op op=AND)
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &, int &)
std::vector< double > gpar
FastHFFibre(std::string &name, const DDCompactView &cpv, double cFibre)
type of data representation of DDCompactView
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
std::vector< double > attL
std::vector< double > longFL
double tShift(const G4ThreeVector &point, int depth, int fromEndAbs=0)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
double attLength(double lambda)
std::vector< double > radius
DDsvalues_type mergedSpecifics() const
double zShift(const G4ThreeVector &point, int depth, int fromEndAbs=0)
bool firstChild()
set the current node to the first child ...
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
std::vector< double > shortFL
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.