77 verbosity_( iConfig.getUntrackedParameter<unsigned
int>(
"verbosity", 1 ) ),
97 std::deque<const DetGeomDesc*>
buffer;
98 std::deque<DetGeomDesc*> bufferNew;
99 buffer.emplace_back( idealGD.
product() );
100 bufferNew.emplace_back( newGD );
102 while ( !buffer.empty() ) {
106 bufferNew.pop_front();
136 for (
unsigned int i = 0;
i < sD->
components().size();
i++ ) {
138 buffer.emplace_back( sDC );
144 bufferNew.emplace_back( cD );
166 const std::vector<int>& copy_num = fv->
copyNumbers();
168 if ( copy_num.size() < 3 )
169 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for strip sensor is " 170 << copy_num.size() <<
". It must be >= 3.";
173 const unsigned int decRPId = copy_num[copy_num.size() - 3];
174 const unsigned int arm = decRPId / 100;
175 const unsigned int station = ( decRPId % 100 ) / 10;
176 const unsigned int rp = decRPId % 10;
177 const unsigned int detector = copy_num[copy_num.size() - 1];
183 unsigned int decRPId = fv->
copyno();
186 if ( decRPId >= 10000 ){
187 decRPId = decRPId % 10000;
188 const unsigned int armIdx = ( decRPId / 100 ) % 10;
189 const unsigned int stIdx = ( decRPId / 10 ) % 10;
190 const unsigned int rpIdx = decRPId % 10;
194 const unsigned int armIdx = ( decRPId / 100 ) % 10;
195 const unsigned int stIdx = ( decRPId / 10 ) % 10;
196 const unsigned int rpIdx = decRPId % 10;
202 const std::vector<int>& copy_num = fv->
copyNumbers();
204 if ( copy_num.size() < 4 )
205 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for TOTEM timing sensor is " 206 << copy_num.size() <<
". It must be >= 4.";
208 const unsigned int decRPId = copy_num[copy_num.size()-4];
209 const unsigned int arm = decRPId / 100,
station = ( decRPId % 100 )/10, rp = decRPId % 10;
210 const unsigned int plane = copy_num[copy_num.size()-2], channel = copy_num[copy_num.size()-1];
221 const std::vector<int>& copy_num = fv->
copyNumbers();
223 if ( copy_num.size() < 4 )
224 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for pixel sensor is " 225 << copy_num.size() <<
". It must be >= 4.";
228 const unsigned int decRPId = copy_num[copy_num.size() - 4] % 10000;
229 const unsigned int arm = decRPId / 100;
230 const unsigned int station = ( decRPId % 100 ) / 10;
231 const unsigned int rp = decRPId % 10;
232 const unsigned int detector = copy_num[copy_num.size() - 2] - 1;
238 const std::vector<int>& copy_num = fv->
copyNumbers();
240 const unsigned int id = copy_num[copy_num.size()-1];
241 const unsigned int arm = copy_num[1]-1;
242 const unsigned int station = 1;
243 const unsigned int rp = 6;
244 const unsigned int plane = (
id / 100 );
245 const unsigned int channel =
id % 100;
252 const std::vector<int>& copy_num = fv->
copyNumbers();
255 if ( copy_num.size() < 2 )
256 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for diamond RP is " 257 << copy_num.size() <<
". It must be >= 2.";
259 const unsigned int arm = copy_num[1] - 1;
260 const unsigned int station = 1;
261 const unsigned int rp = 6;
279 std::unique_ptr<DetGeomDesc>
295 return std::unique_ptr<DetGeomDesc>(
const_cast<DetGeomDesc*
>(
root ) );
300 std::unique_ptr<DetGeomDesc>
315 <<
">> CTPPSGeometryESModule::produceRealGD > Real geometry: " 316 << alignments->
getRPMap().size() <<
" RP and " 317 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
322 <<
">> CTPPSGeometryESModule::produceRealGD > Real geometry: No alignments applied.";
327 return std::unique_ptr<DetGeomDesc>( newGD );
332 std::unique_ptr<DetGeomDesc>
347 <<
">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: " 348 << alignments->
getRPMap().size() <<
" RP and " 349 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
353 <<
">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: No alignments applied.";
358 return std::unique_ptr<DetGeomDesc>( newGD );
363 std::unique_ptr<CTPPSGeometry>
369 return std::make_unique<CTPPSGeometry>( gD.
product() );
374 std::unique_ptr<CTPPSGeometry>
380 return std::make_unique<CTPPSGeometry>( gD.
product() );
Detector ID class for TOTEM Si strip detectors.
bool parent()
set the current node to the parent node ...
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::string DDD_CTPPS_PIXELS_RP_NAME
std::string compactViewTag_
nav_type copyNumbers() const
return the stack of copy numbers
bool nextSibling()
set the current node to the next sibling ...
static void applyAlignments(const edm::ESHandle< DetGeomDesc > &, const edm::ESHandle< RPAlignmentCorrectionsData > &, DetGeomDesc *&)
std::unique_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
Builds ideal, real and misaligned geometries.
const std::string DDD_TOTEM_TIMING_RP_NAME
const mapType & getRPMap() const
returns the map of RP alignment corrections
Event setup record containing the real (actual) geometry information.
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
const std::string DDD_CTPPS_DIAMONDS_SEGMENT_NAME
int copyno() const
Copy number associated with the current node.
RPAlignmentCorrectionData & getRPCorrection(unsigned int id)
returns the correction value from the RP map
void ApplyAlignment(const RPAlignmentCorrectionData &)
alignment
std::unique_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
void setGeographicalID(DetId id)
ID stuff.
virtual ConstContainer components() const
access to the tree structure
const DepRecordT getRecord() const
RPAlignmentCorrectionData getFullSensorCorrection(unsigned int id, bool useRPErrors=false) const
void get(HolderT &iHolder) const
Geometrical description of a sensor.
Alignment correction for an element of the CT-PPS detector. Within the geometry description, every sensor (more generally every element) is given its translation and rotation. These two quantities shall be understood in local-to-global coordinate transform. That is, if r_l is a point in local coordinate system and x_g in global, then it holds.
const std::string DDD_TOTEM_TIMING_SENSOR_TMPL
std::unique_ptr< DetGeomDesc > produceRealGD(const VeryForwardRealGeometryRecord &)
A DDFilter that always returns true.
const std::string DDD_TOTEM_RP_RP_NAME
DDD names of RP volumes.
virtual DetId geographicalID() const
~CTPPSGeometryESModule() override
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
const std::string DDD_CTPPS_DIAMONDS_RP_NAME
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::unique_ptr< DetGeomDesc > produceMisalignedGD(const VeryForwardMisalignedGeometryRecord &)
CTPPSGeometryESModule(const edm::ParameterSet &)
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
static void buildDetGeomDesc(DDFilteredView *fv, DetGeomDesc *gd)
bool firstChild()
set the current node to the first child ...
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
std::unique_ptr< DetGeomDesc > produceIdealGD(const IdealGeometryRecord &)
const std::string DDD_TOTEM_RP_SENSOR_NAME
DDD names of sensors.
const std::string DDD_CTPPS_PIXELS_SENSOR_NAME
T const * product() const
void addComponent(DetGeomDesc *)
const std::string & name() const
Returns the name.
const std::string DDD_CTPPS_UFSD_SEGMENT_NAME
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...