17 #include "CLHEP/Units/GlobalPhysicalConstants.h" 18 #include "CLHEP/Units/GlobalSystemOfUnits.h" 24 std::cout <<
"DDAHcalModuleAlgo info: Creating an instance" << std::endl;
36 tile = sArgs[
"TileName"];
41 names = vsArgs[
"VolumeNames"];
42 thick = vArgs[
"Thickness"];
48 <<
" types of volumes" << std::endl;
49 for (
unsigned int i=0;
i<
names.size(); ++
i)
52 <<
" first copy number " <<
copyNumber[
i] << std::endl;
57 std::cout <<
"DDAHcalModuleAlgo: " <<
layers.size() <<
" blocks" <<std::endl;
58 for (
unsigned int i=0;
i<
layers.size(); ++
i)
60 <<
" with " <<
layers[
i] <<
" layers" << std::endl;
69 <<
" sensitive class " <<
layerSense[
i] << std::endl;
74 std::cout <<
"DDAHcalModuleAlgo: " <<
widths.size() <<
" sizes for width " 76 for (
unsigned int i=0;
i<
widths.size(); ++
i)
83 std::cout <<
"DDAHcalModuleAlgo: " <<
tileN.size() <<
" tile positioning " 85 for (
unsigned int i=0;
i<
tileN.size(); ++
i)
103 std::cout <<
"==>> Constructing DDAHcalModuleAlgo..." << std::endl;
107 std::cout <<
"<<== End of DDAHcalModuleAlgo construction ..." << std::endl;
115 std::cout <<
"DDAHcalModuleAlgo test: \t\tInside Layers" << std::endl;
119 for (
unsigned int i=0;
i<
layers.size();
i++) {
124 for (
int ly=laymin; ly<laymax; ++ly) {
132 std::cout <<
"DDAHcalModuleAlgo test: Layer " << ly <<
":" << ii
133 <<
" Front " << zi <<
" Back " << zo
134 <<
" superlayer thickness " << layerThick[
i] << std::endl;
147 <<
" Box made of " << matName <<
" of dimensions " 158 <<
" Box made of " << matName <<
" of dimensions " 166 cpv.
position(glog, module, copy, r1, rot);
169 std::cout <<
"DDAHcalModuleAlgo test: " << glog.
name() <<
" number " 170 << copy <<
" positioned in " << module.
name() <<
" at " << r1
171 <<
" with " << rot << std::endl;
177 if (fabs(thickTot-layerThick[
i]) < 0.00001) {
178 }
else if (thickTot > layerThick[i]) {
179 edm::LogError(
"HGCalGeom") <<
"Thickness of the partition " << layerThick[
i]
180 <<
" is smaller than thickness " << thickTot
181 <<
" of all its components **** ERROR ****\n";
182 }
else if (thickTot < layerThick[i]) {
184 << layerThick[
i] <<
" does not match with " 185 << thickTot <<
" of the components\n";
193 int nrow =
tileN[1]/2;
199 for (
int nr=-nrow; nr <= nrow; ++nr) {
200 int inr = (nr >= 0) ? nr : -nr;
202 for (
int nc=-ncol; nc <=
ncol; ++nc) {
203 int inc = (nc >= 0) ? nc : -nc;
205 if (nr != 0 && nc != 0) {
208 int copy = inr*10 + inc;
209 if (nc < 0) copy += 100;
210 if (nr < 0) copy += 1000;
215 std::cout <<
"DDAHcalModuleAlgo: " << name <<
" number " << copy
216 <<
" positioned in " << glog.
ddname() <<
" at " << tran
217 <<
" with " << rotation << std::endl;
223 std::cout <<
"DDAHcalModuleAlgo: " << kount <<
" tiles for " 224 << glog.
ddname() << std::endl;
std::vector< int > layerType
std::vector< std::string > materials
std::vector< double > widths
std::vector< int > copyNumber
DDMaterial is used to define and access material information.
void execute(DDCompactView &cpv)
void position(const DDLogicalPart &self, const DDLogicalPart &parent, std::string copyno, const DDTranslation &trans, const DDRotation &rot, const DDDivision *div=NULL)
void constructLayers(DDLogicalPart, DDCompactView &cpv)
DDName is used to identify DDD entities uniquely.
std::vector< double > heights
static std::string & ns()
type of data representation of DDCompactView
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Represents a uniquely identifyable rotation matrix.
U second(std::pair< T, U > const &p)
std::vector< int > dbl_to_int(const std::vector< double > &vecdbl)
Converts a std::vector of doubles to a std::vector of int.
std::vector< double > thick
std::vector< std::string > names
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
static DDSolid box(const DDName &name, double xHalf, double yHalf, double zHalf)
Creates a box with side length 2*xHalf, 2*yHalf, 2*zHalf.
std::vector< double > layerThick
virtual ~DDAHcalModuleAlgo()
void initialize(const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &vsArgs)
std::vector< double > tileStep
std::vector< int > layers
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = ':'
std::vector< int > layerSense
void positionSensitive(DDLogicalPart &glog, DDCompactView &cpv)