39 const std::vector<DetId>& detids( rgeo.
detIds());
40 std::vector<GEMSuperChamber*> superChambers;
43 std::vector<double>::const_iterator tranStart;
44 std::vector<double>::const_iterator shapeStart;
45 std::vector<double>::const_iterator rotStart;
46 std::vector<std::string>::const_iterator strStart;
48 for(
unsigned int id = 0;
id < detids.size(); ++
id )
51 GEMDetId chid( gemid.region(), gemid.ring(), gemid.station(),
52 gemid.layer(), gemid.chamber(), 0 );
63 *(rotStart+3), *(rotStart+4), *(rotStart+5),
64 *(rotStart+6), *(rotStart+7), *(rotStart+8));
66 float be = *(shapeStart+0)/cm;
67 float te = *(shapeStart+1)/cm;
68 float ap = *(shapeStart+2)/cm;
69 float ti = *(shapeStart+3)/cm;
70 float nstrip = *(shapeStart+4);
71 float npad = *(shapeStart+5);
75 std::vector<float> pars;
76 pars.emplace_back(be);
77 pars.emplace_back(te);
78 pars.emplace_back(ap);
79 pars.emplace_back(nstrip);
80 pars.emplace_back(npad);
90 rot.rotateAxes( newX, newY, newZ );
95 LogDebug(
"GEMGeometryBuilder") <<
"GEM Eta Partition created with id = " << gemid
96 <<
" and added to the GEMGeometry" << std::endl;
97 theGeometry->add(gep);
99 std::list<GEMEtaPartition *> gepList;
103 gepList.emplace_back(gep);
109 for(
const auto& ich :
m_chids ) {
111 std::list<GEMEtaPartition * > gepList = ich.second;
116 for(
const auto& gep : gepList ) {
123 if( chid.
layer() == 1 ) {
126 LogDebug(
"GEMGeometryBuilder") <<
"GEM SuperChamber created with id = " << schid
127 <<
" and added to the GEMGeometry" << std::endl;
128 superChambers.emplace_back( sch );
133 LogDebug(
"GEMGeometryBuilder") <<
"GEM Chamber created with id = " << chid
134 <<
" = " << chid.
rawId() <<
" and added to the GEMGeometry" << std::endl;
135 LogDebug(
"GEMGeometryBuilder") <<
"GEM Chamber has following eta partitions associated: " << std::endl;
138 for(
const auto& gep : gepList ) {
140 LogDebug(
"GEMGeometryBuilder") <<
" --> GEM Eta Partition " <<
GEMDetId(( *gep ).id()) << std::endl;
143 theGeometry->add( ch );
150 for(
int re = -1; re <= 1; re = re+2 ) {
157 for(
int ri = 1; ri <= 1; ++ri ) {
159 for(
unsigned sch = 0; sch < superChambers.size(); ++sch ) {
162 if (detId.region() != re || detId.station() != st || detId.ring() != ri)
continue;
164 superChamber->
add( theGeometry->chamber(
GEMDetId( detId.region(), detId.ring(), detId.station(), 1, detId.chamber(), 0 )));
165 superChamber->
add( theGeometry->chamber(
GEMDetId( detId.region(), detId.ring(), detId.station(), 2, detId.chamber(), 0 )));
166 ring->
add( superChamber );
167 theGeometry->add( superChamber );
168 LogDebug(
"GEMGeometryBuilderFromDDD") <<
"Adding super chamber " << detId <<
" to ring: " 169 <<
"re " << re <<
" st " << st <<
" ri " << ri << std::endl;
171 LogDebug(
"GEMGeometryBuilderFromDDD") <<
"Adding ring " << ri <<
" to station " <<
"re " << re <<
" st " << st << std::endl;
172 station->
add( ring );
173 theGeometry->add( ring );
175 LogDebug(
"GEMGeometryBuilderFromDDD") <<
"Adding station " << st <<
" to region " << re << std::endl;
176 region->
add( station );
177 theGeometry->add( station );
179 LogDebug(
"GEMGeometryBuilderFromDDD") <<
"Adding region " << re <<
" to the geometry " << std::endl;
180 theGeometry->add( region );
std::vector< double >::const_iterator rotStart(size_t ind) const
int chamber() const
Chamber id: it identifies a chamber in a ring it goes from 1 to 36.
void add(GEMRing *ring)
Add ring to the station which takes ownership.
void add(GEMSuperChamber *ch)
Add super chamber to the ring which takes ownership.
std::vector< std::string >::const_iterator strStart(size_t ind) const
uint32_t rawId() const
get the raw id
int layer() const
Layer id: each station have two layers of chambers: layer 1 is the inner chamber and layer 2 is the o...
int station() const
Station id : the station is the pair of chambers at same disk.
std::vector< double >::const_iterator tranStart(size_t ind) const
void add(GEMEtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
static const int maxStationId
void setName(std::string name)
Set the station name.
void add(const GEMChamber *ch)
Add chamber to the super chamber which takes ownership.
int region() const
Region id: 0 for Barrel Not in use, +/-1 For +/- Endcap.
const std::vector< DetId > & detIds() const
GEMDetId id() const
Return the GEMDetId of this super chamber.
std::vector< double >::const_iterator shapeStart(size_t ind) const
std::map< GEMDetId, std::list< GEMEtaPartition * > > m_chids
void add(GEMStation *st)
Add station to the region which takes ownership.