16 #include "CLHEP/Units/GlobalSystemOfUnits.h" 44 int noOfAnonParams = 0;
45 std::vector<const DDsvalues_type *> spec = fv.
specifics();
46 std::vector<const DDsvalues_type *>::const_iterator spit = spec.begin();
47 std::vector<double> uparvals;
48 std::vector<double> fpar;
49 std::vector<double> dpar;
50 std::vector<double> gtran( 3 );
51 std::vector<double> grmat( 9 );
52 std::vector<double> trm ( 9 );
70 ", octal " << std::oct <<
id <<
", hex " << std::hex <<
id <<
std::dec;
73 int jendcap = detid.
endcap();
75 int jring = detid.
ring();
77 int jlayer = detid.
layer();
88 bool chSpecsAlreadyExist =
false;
96 LogDebug(
myName) <<
"already found a " << chamberType <<
" at index " << ct;
97 chSpecsAlreadyExist =
true;
99 for (; spit != spec.end(); spit++) {
100 DDsvalues_type::const_iterator it = (**spit).begin();
101 for (; it != (**spit).end(); it++) {
103 if (it->second.name() ==
"upar") {
104 uparvals.emplace_back(it->second.doubles().size());
105 for (
double i : it->second.doubles()) {
106 uparvals.emplace_back(
i);
109 }
else if (it->second.name() ==
"NoOfAnonParams") {
110 noOfAnonParams =
static_cast<int>( it->second.doubles()[0] );
111 }
else if (it->second.name() ==
"NumWiresPerGrp") {
113 for (
double i : it->second.doubles()) {
117 }
else if ( it->second.name() ==
"NumGroups" ) {
119 for (
double i : it->second.doubles()) {
122 }
else if ( it->second.name() ==
"WireSpacing" ) {
124 }
else if ( it->second.name() ==
"AlignmentPinToFirstWire" ) {
126 }
else if ( it->second.name() ==
"TotNumWireGroups" ) {
128 }
else if ( it->second.name() ==
"LengthOfFirstWire" ) {
130 }
else if ( it->second.name() ==
"LengthOfLastWire" ) {
132 }
else if ( it->second.name() ==
"RadialExtentOfWirePlane" ) {
152 for (CSCWireGroupPackage::Container::const_iterator it = wg.
wiresInEachGroup.begin();
154 uparvals.emplace_back(*it);
156 for (CSCWireGroupPackage::Container::const_iterator it = wg.
consecutiveGroups.begin();
158 uparvals.emplace_back(*it);
176 dpar[4]/cm <<
", " << dpar[8]/cm <<
", " <<
177 dpar[3]/cm <<
", " << dpar[0]/cm;
179 fpar.emplace_back( ( dpar[4]/cm) );
180 fpar.emplace_back( ( dpar[8]/cm ) );
181 fpar.emplace_back( ( dpar[3]/cm ) );
182 fpar.emplace_back( ( dpar[0]/cm ) );
191 gtran[1] <<
", gtran[2]=" << gtran[2];
195 fv.
rotation().GetComponents(trm.begin(), trm.end());
197 for (
size_t i = 0;
i < 9; ++
i) {
198 grmat[
i] = (
float) 1.0 * trm[rotindex];
199 rotindex = rotindex + 3;
200 if ( (
i+1) % 3 == 0 ) {
201 rotindex = (
i+1) / 3;
231 " C" << jchamber <<
" L" << jlayer <<
232 " gx=" << gtran[0] <<
", gy=" << gtran[1] <<
", gz=" << gtran[2] <<
233 " thickness=" << fpar[2]*2.;
238 " gap=" << uparvals[32]/10. <<
" panel=" << uparvals[33]/10. <<
" offset=" << uparvals[34]/10.;
240 if ( jstation==1 && jring==1 ) {
246 rig.
insert(
id, gtran, grmat, fpar );
247 if ( !chSpecsAlreadyExist ) {
249 LogDebug(
myName) <<
" inserting chamber type " << chamberType << std::endl;
253 std::copy ( uparvals.begin(), uparvals.end(), std::back_inserter(rdp.
pfupars));
260 const int kNoOfAnonParams = 35;
261 if ( noOfAnonParams == 0 ) { noOfAnonParams = kNoOfAnonParams; }
263 std::copy( uparvals.begin()+noOfAnonParams+1, uparvals.begin()+(2*noOfAnonParams)+2, uparvals.begin()+1 );
266 rig.
insert( detid1a.rawId(), gtran, grmat, fpar );
276 LogDebug(
myName) <<
"found chamber type " << chtypeA <<
" so don't put it in! ";
283 std::copy ( uparvals.begin(), uparvals.end(), std::back_inserter(rdp.
pfupars));
288 rig.
insert(
id, gtran, grmat, fpar );
289 if ( !chSpecsAlreadyExist ) {
295 std::copy ( uparvals.begin(), uparvals.end(), std::back_inserter(rdp.
pfupars));
301 doSubDets = fv.
next();
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
static int whatChamberType(int istation, int iring)
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
double narrowWidthOfWirePlane
Container wiresInEachGroup
virtual ~CSCGeometryParsFromDD()
Destructor.
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
type of data representation of DDCompactView
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
A DDSolid represents the shape of a part.
bool build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig, CSCRecoDigiParameters &rdp)
Build the geometry returning the RecoIdealGeometry and the CSCRecoDigiParameters objects.
std::vector< float > pfupars
U second(std::pair< T, U > const &p)
bool next()
set current node to the next node in the filtered tree
std::vector< int > pChamberType
std::vector< int > pUserParOffset
DDSolidShape shape(void) const
The type of the solid.
double wideWidthOfWirePlane
DDSolid solidA(void) const
std::string toString() const
std::vector< int > pUserParSize
int baseNumberToUnitNumber(const MuonBaseNumber &) override
bool firstChild()
set the current node to the first child ...
CSCGeometryParsFromDD()
Constructor.
Container consecutiveGroups
const DDTranslation & translation() const
The absolute translation of the current node.
std::vector< const DDsvalues_type * > specifics() const
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history)
double alignmentPinToFirstWire