@@ -59,47 +59,47 @@ class DDHGCalSiliconRotatedCassette : public DDAlgorithm {
5959 static constexpr double tol1_ = 0.01 ;
6060 static constexpr double tol2_ = 0.00001 ;
6161
62- int waferTypes_; // Number of wafer types
63- int passiveTypes_; // Number of passive types
64- int facingTypes_; // Types of facings of modules toward IP
65- int orientationTypes_; // Number of wafer orienations
66- int partialTypes_; // Number of partial types
67- int placeOffset_; // Offset for placement
68- int firstLayer_; // Copy # of the first sensitive layer
69- int absorbMode_; // Absorber mode
70- int sensitiveMode_; // Sensitive mode
71- int passiveMode_; // Mode for passive volumes
72- double zMinBlock_; // Starting z-value of the block
73- double waferSize_; // Width of the wafer
74- double waferSepar_; // Sensor separation
75- int sectors_; // Sectors
76- int cassettes_; // Cassettes
77- std::string rotstr_; // Rotation matrix (if needed)
78- std::vector<std::string> waferFull_; // Names of full wafer modules
79- std::vector<std::string> waferPart_; // Names of partial wafer modules
80- std::vector<std::string> passiveAbsorb_;// Names of passive absorber modules
81- std::vector<std::string> passiveCool_; // Names of passive cooling modules
82- std::vector<std::string> materials_; // names of materials
83- std::vector<std::string> names_; // Names of volumes
84- std::vector<double > thick_; // Thickness of the material
85- std::vector<int > copyNumber_; // Initial copy numbers
86- std::vector<int > layers_; // Number of layers in a section
87- std::vector<double > layerThick_; // Thickness of each section
88- std::vector<int > layerType_; // Type of the layer
89- std::vector<int > layerSense_; // Content of a layer (sensitive?)
90- std::vector<double > slopeB_; // Slope at the lower R
91- std::vector<double > zFrontB_; // Starting Z values for the slopes
92- std::vector<double > rMinFront_; // Corresponding rMin's
93- std::vector<double > slopeT_; // Slopes at the larger R
94- std::vector<double > zFrontT_; // Starting Z values for the slopes
95- std::vector<double > rMaxFront_; // Corresponding rMax's
96- std::vector<int > layerOrient_; // Layer orientation (Centering, rotations..)
97- std::vector<int > waferIndex_; // Wafer index for the types
98- std::vector<int > waferProperty_; // Wafer property
99- std::vector<int > waferLayerStart_; // Index of wafers in each layer
100- std::vector<double > cassetteShift_; // Shifts of the cassetes
101- std::string nameSpace_; // Namespace of this and ALL sub-parts
102- std::unordered_set<int > copies_; // List of copy #'s
62+ int waferTypes_; // Number of wafer types
63+ int passiveTypes_; // Number of passive types
64+ int facingTypes_; // Types of facings of modules toward IP
65+ int orientationTypes_; // Number of wafer orienations
66+ int partialTypes_; // Number of partial types
67+ int placeOffset_; // Offset for placement
68+ int firstLayer_; // Copy # of the first sensitive layer
69+ int absorbMode_; // Absorber mode
70+ int sensitiveMode_; // Sensitive mode
71+ int passiveMode_; // Mode for passive volumes
72+ double zMinBlock_; // Starting z-value of the block
73+ double waferSize_; // Width of the wafer
74+ double waferSepar_; // Sensor separation
75+ int sectors_; // Sectors
76+ int cassettes_; // Cassettes
77+ std::string rotstr_; // Rotation matrix (if needed)
78+ std::vector<std::string> waferFull_; // Names of full wafer modules
79+ std::vector<std::string> waferPart_; // Names of partial wafer modules
80+ std::vector<std::string> passiveAbsorb_; // Names of passive absorber modules
81+ std::vector<std::string> passiveCool_; // Names of passive cooling modules
82+ std::vector<std::string> materials_; // names of materials
83+ std::vector<std::string> names_; // Names of volumes
84+ std::vector<double > thick_; // Thickness of the material
85+ std::vector<int > copyNumber_; // Initial copy numbers
86+ std::vector<int > layers_; // Number of layers in a section
87+ std::vector<double > layerThick_; // Thickness of each section
88+ std::vector<int > layerType_; // Type of the layer
89+ std::vector<int > layerSense_; // Content of a layer (sensitive?)
90+ std::vector<double > slopeB_; // Slope at the lower R
91+ std::vector<double > zFrontB_; // Starting Z values for the slopes
92+ std::vector<double > rMinFront_; // Corresponding rMin's
93+ std::vector<double > slopeT_; // Slopes at the larger R
94+ std::vector<double > zFrontT_; // Starting Z values for the slopes
95+ std::vector<double > rMaxFront_; // Corresponding rMax's
96+ std::vector<int > layerOrient_; // Layer orientation (Centering, rotations..)
97+ std::vector<int > waferIndex_; // Wafer index for the types
98+ std::vector<int > waferProperty_; // Wafer property
99+ std::vector<int > waferLayerStart_; // Index of wafers in each layer
100+ std::vector<double > cassetteShift_; // Shifts of the cassetes
101+ std::string nameSpace_; // Namespace of this and ALL sub-parts
102+ std::unordered_set<int > copies_; // List of copy #'s
103103 double alpha_, cosAlpha_;
104104};
105105
@@ -390,12 +390,12 @@ void DDHGCalSiliconRotatedCassette::constructLayers(const DDLogicalPart& module,
390390 if (layerSense_[ly] > 0 ) {
391391 positionSensitive (glog, (copy - firstLayer_), cpv);
392392 } else if (passiveMode_ > 0 ) {
393- unsigned int num = (-layerSense_[ly] <= waferTypes_) ? passiveAbsorb_.size () : passiveCool_.size ();
394- if (num > 0 )
395- positionPassiveNew (glog, (copy - firstLayer_), -layerSense_[ly], cpv);
396- } else {
397- positionPassive (glog, (copy - firstLayer_), -layerSense_[ly], cpv);
398- }
393+ unsigned int num = (-layerSense_[ly] <= waferTypes_) ? passiveAbsorb_.size () : passiveCool_.size ();
394+ if (num > 0 )
395+ positionPassiveNew (glog, (copy - firstLayer_), -layerSense_[ly], cpv);
396+ } else {
397+ positionPassive (glog, (copy - firstLayer_), -layerSense_[ly], cpv);
398+ }
399399 }
400400 DDTranslation r1 (0 , 0 , zz);
401401 DDRotation rot;
@@ -544,9 +544,9 @@ void DDHGCalSiliconRotatedCassette::positionSensitive(const DDLogicalPart& glog,
544544
545545// Position the passive modules (mode == 0)
546546void DDHGCalSiliconRotatedCassette::positionPassive (const DDLogicalPart& glog,
547- int layer,
548- int absType,
549- DDCompactView& cpv) {
547+ int layer,
548+ int absType,
549+ DDCompactView& cpv) {
550550#ifdef EDM_ML_DEBUG
551551 edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: positionPassiveAbsorber is called" ;
552552#endif
@@ -561,7 +561,10 @@ void DDHGCalSiliconRotatedCassette::positionPassive(const DDLogicalPart& glog,
561561 double dy = 0.75 * dely;
562562 const auto & xyoff = geomTools_.shiftXY (layercenter, (waferSize_ + waferSepar_));
563563#ifdef EDM_ML_DEBUG
564- edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: PositionPassive Layer " << layer << " LayerCenter " << layercenter << " :" << layertype << " r " << delx << " R " << dely << " dy " << dy << " Shift " << xyoff.first << " :" << xyoff.second << " WaferSize " << (waferSize_ + waferSepar_) << " index " << firstWafer << " :" << (lastWafer - 1 );
564+ edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: PositionPassive Layer " << layer << " LayerCenter "
565+ << layercenter << " :" << layertype << " r " << delx << " R " << dely << " dy " << dy
566+ << " Shift " << xyoff.first << " :" << xyoff.second << " WaferSize "
567+ << (waferSize_ + waferSepar_) << " index " << firstWafer << " :" << (lastWafer - 1 );
565568 int ium (0 ), ivm (0 ), kount (0 );
566569 edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: " << glog.ddname () << " r " << delx << " R " << dely
567570 << " dy " << dy << " Shift " << xyoff.first << " :" << xyoff.second << " WaferSize "
@@ -651,15 +654,16 @@ void DDHGCalSiliconRotatedCassette::positionPassive(const DDLogicalPart& glog,
651654
652655// Position the passive modules (mode > 0)
653656void DDHGCalSiliconRotatedCassette::positionPassiveNew (const DDLogicalPart& glog,
654- int layer,
655- int absType,
656- DDCompactView& cpv) {
657+ int layer,
658+ int absType,
659+ DDCompactView& cpv) {
657660#ifdef EDM_ML_DEBUG
658661 edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: positionPassiveNew is called" ;
659662 int kount (0 );
660663#endif
661664 bool type = (absType <= waferTypes_);
662- int num = type ? (passiveAbsorb_.size () / (cassettes_ * layers_.size ())) : (passiveCool_.size () / (cassettes_ * layers_.size ()));
665+ int num = type ? (passiveAbsorb_.size () / (cassettes_ * layers_.size ()))
666+ : (passiveCool_.size () / (cassettes_ * layers_.size ()));
663667#ifdef EDM_ML_DEBUG
664668 edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: Type " << type << " number per cassette " << num;
665669#endif
@@ -669,19 +673,23 @@ void DDHGCalSiliconRotatedCassette::positionPassiveNew(const DDLogicalPart& glog
669673 int i1 = num * k + n;
670674 int i2 = num * layer * cassettes_ + i1;
671675#ifdef EDM_ML_DEBUG
672- edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette::Passive2: layer " << layer + 1 << " cassette " << " PassiveIndex " << i1 << " :" << i2 << " :" << passiveAbsorb_.size () << " :" << passiveCool_.size ();
676+ edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette::Passive2: layer " << layer + 1 << " cassette "
677+ << " PassiveIndex " << i1 << " :" << i2 << " :" << passiveAbsorb_.size () << " :"
678+ << passiveCool_.size ();
673679#endif
674680 std::string passive = (type) ? passiveAbsorb_[i2] : passiveCool_[i2];
675681#ifdef EDM_ML_DEBUG
676- edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: Passive2 " << passive << " number " << i2 << " pos " << xpos << " :" << ypos << " :" << zpos;
682+ edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: Passive2 " << passive << " number " << i2
683+ << " pos " << xpos << " :" << ypos << " :" << zpos;
677684 kount++;
678685#endif
679686 DDTranslation tran (xpos, ypos, zpos);
680687 DDRotation rotation;
681688 DDName name = DDName (DDSplit (passive).first , DDSplit (passive).second );
682689 cpv.position (name, glog.ddname (), i2, tran, rotation);
683690#ifdef EDM_ML_DEBUG
684- edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: " << name << " number " << i2 << " positioned in " << glog.ddname () << " at " << tran << " with no rotation" ;
691+ edm::LogVerbatim (" HGCalGeom" ) << " DDHGCalSiliconRotatedCassette: " << name << " number " << i2
692+ << " positioned in " << glog.ddname () << " at " << tran << " with no rotation" ;
685693#endif
686694 }
687695 }
0 commit comments