26 #include "CLHEP/Units/GlobalSystemOfUnits.h"
48 DDValue muval(attribute, value, 0.0);
69 int noOfAnonParams = 0;
70 std::vector<const DDsvalues_type *> spec = fv.
specifics();
71 std::vector<const DDsvalues_type *>::const_iterator spit = spec.begin();
72 std::vector<double> uparvals;
73 std::vector<double> fpar;
74 std::vector<double> dpar;
75 std::vector<double> gtran( 3 );
76 std::vector<double> grmat( 9 );
77 std::vector<double> trm ( 9 );
95 ", octal " << std::oct <<
id <<
", hex " << std::hex <<
id << std::dec;
98 int jendcap = detid.
endcap();
100 int jring = detid.
ring();
101 int jchamber = detid.
chamber();
102 int jlayer = detid.
layer();
113 bool chSpecsAlreadyExist =
false;
122 chSpecsAlreadyExist =
true;
124 for (; spit != spec.end(); spit++) {
125 DDsvalues_type::const_iterator it = (**spit).begin();
126 for (; it != (**spit).end(); it++) {
128 if (it->second.name() ==
"upar") {
129 uparvals.push_back(it->second.doubles().size());
130 for (
size_t i = 0;
i < it->second.doubles().size(); ++
i) {
131 uparvals.push_back(it->second.doubles()[
i]);
134 }
else if (it->second.name() ==
"NoOfAnonParams") {
135 noOfAnonParams =
static_cast<int>( it->second.doubles()[0] );
136 }
else if (it->second.name() ==
"NumWiresPerGrp") {
138 for (
size_t i = 0 ;
i < it->second.doubles().size();
i++) {
142 }
else if ( it->second.name() ==
"NumGroups" ) {
144 for (
size_t i = 0 ;
i < it->second.doubles().size();
i++) {
147 }
else if ( it->second.name() ==
"WireSpacing" ) {
149 }
else if ( it->second.name() ==
"AlignmentPinToFirstWire" ) {
151 }
else if ( it->second.name() ==
"TotNumWireGroups" ) {
153 }
else if ( it->second.name() ==
"LengthOfFirstWire" ) {
155 }
else if ( it->second.name() ==
"LengthOfLastWire" ) {
157 }
else if ( it->second.name() ==
"RadialExtentOfWirePlane" ) {
177 for (CSCWireGroupPackage::Container::const_iterator it = wg.
wiresInEachGroup.begin();
179 uparvals.push_back(*it);
181 for (CSCWireGroupPackage::Container::const_iterator it = wg.
consecutiveGroups.begin();
183 uparvals.push_back(*it);
201 dpar[4]/cm <<
", " << dpar[8]/cm <<
", " <<
202 dpar[3]/cm <<
", " << dpar[0]/cm;
204 fpar.push_back( ( dpar[4]/cm) );
205 fpar.push_back( ( dpar[8]/cm ) );
206 fpar.push_back( ( dpar[3]/cm ) );
207 fpar.push_back( ( dpar[0]/cm ) );
211 gtran[0] = (float) 1.0 * (fv.
translation().X() / cm);
212 gtran[1] = (float) 1.0 * (fv.
translation().Y() / cm);
213 gtran[2] = (float) 1.0 * (fv.
translation().Z() / cm);
216 gtran[1] <<
", gtran[2]=" << gtran[2];
220 fv.
rotation().GetComponents(trm.begin(), trm.end());
222 for (
size_t i = 0;
i < 9; ++
i) {
223 grmat[
i] = (float) 1.0 * trm[rotindex];
224 rotindex = rotindex + 3;
225 if ( (
i+1) % 3 == 0 ) {
226 rotindex = (
i+1) / 3;
256 " C" << jchamber <<
" L" << jlayer <<
257 " gx=" << gtran[0] <<
", gy=" << gtran[1] <<
", gz=" << gtran[2] <<
258 " thickness=" << fpar[2]*2.;
263 " gap=" << uparvals[32]/10. <<
" panel=" << uparvals[33]/10. <<
" offset=" << uparvals[34]/10.;
265 if ( jstation==1 && jring==1 ) {
271 rig.
insert(
id, gtran, grmat, fpar );
272 if ( !chSpecsAlreadyExist ) {
278 std::copy ( uparvals.begin(), uparvals.end(), std::back_inserter(rdp.
pfupars));
285 const int kNoOfAnonParams = 35;
286 if ( noOfAnonParams == 0 ) { noOfAnonParams = kNoOfAnonParams; }
288 std::copy( uparvals.begin()+noOfAnonParams+1, uparvals.begin()+(2*noOfAnonParams)+2, uparvals.begin()+1 );
291 rig.
insert( detid1a.rawId(), gtran, grmat, fpar );
308 std::copy ( uparvals.begin(), uparvals.end(), std::back_inserter(rdp.
pfupars));
313 rig.
insert(
id, gtran, grmat, fpar );
314 if ( !chSpecsAlreadyExist ) {
320 std::copy ( uparvals.begin(), uparvals.end(), std::back_inserter(rdp.
pfupars));
326 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.
void addFilter(const DDFilter &, log_op op=AND)
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
virtual int baseNumberToUnitNumber(const MuonBaseNumber)
std::string toString() const
std::vector< int > pUserParSize
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)
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
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.