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();
138 for (
unsigned int i = 0;
i < sD->
components().size();
i++ ) {
140 buffer.emplace_back( sDC );
146 bufferNew.emplace_back( cD );
168 const std::vector<int>& copy_num = fv->
copyNumbers();
170 if ( copy_num.size() < 3 )
171 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for strip sensor is " 172 << copy_num.size() <<
". It must be >= 3.";
175 const unsigned int decRPId = copy_num[copy_num.size() - 3];
176 const unsigned int arm = decRPId / 100;
177 const unsigned int station = ( decRPId % 100 ) / 10;
178 const unsigned int rp = decRPId % 10;
179 const unsigned int detector = copy_num[copy_num.size() - 1];
185 unsigned int decRPId = fv->
copyno();
188 if ( decRPId >= 10000 ){
189 decRPId = decRPId % 10000;
190 const unsigned int armIdx = ( decRPId / 100 ) % 10;
191 const unsigned int stIdx = ( decRPId / 10 ) % 10;
192 const unsigned int rpIdx = decRPId % 10;
196 const unsigned int armIdx = ( decRPId / 100 ) % 10;
197 const unsigned int stIdx = ( decRPId / 10 ) % 10;
198 const unsigned int rpIdx = decRPId % 10;
204 const std::vector<int>& copy_num = fv->
copyNumbers();
206 if ( copy_num.size() < 4 )
207 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for TOTEM timing sensor is " 208 << copy_num.size() <<
". It must be >= 4.";
210 const unsigned int decRPId = copy_num[copy_num.size()-4];
211 const unsigned int arm = decRPId / 100,
station = ( decRPId % 100 )/10, rp = decRPId % 10;
212 const unsigned int plane = copy_num[copy_num.size()-2], channel = copy_num[copy_num.size()-1];
223 const std::vector<int>& copy_num = fv->
copyNumbers();
225 if ( copy_num.size() < 4 )
226 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for pixel sensor is " 227 << copy_num.size() <<
". It must be >= 4.";
230 const unsigned int decRPId = copy_num[copy_num.size() - 4] % 10000;
231 const unsigned int arm = decRPId / 100;
232 const unsigned int station = ( decRPId % 100 ) / 10;
233 const unsigned int rp = decRPId % 10;
234 const unsigned int detector = copy_num[copy_num.size() - 2] - 1;
240 const std::vector<int>& copy_num = fv->
copyNumbers();
242 const unsigned int id = copy_num[copy_num.size()-1];
243 const unsigned int arm = copy_num[1]-1;
244 const unsigned int station = 1;
245 const unsigned int rp = 6;
246 const unsigned int plane = (
id / 100 );
247 const unsigned int channel =
id % 100;
254 const std::vector<int>& copy_num = fv->
copyNumbers();
257 if ( copy_num.size() < 2 )
258 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for diamond RP is " 259 << copy_num.size() <<
". It must be >= 2.";
261 const unsigned int arm = copy_num[1] - 1;
262 const unsigned int station = 1;
263 const unsigned int rp = 6;
281 std::unique_ptr<DetGeomDesc>
297 return std::unique_ptr<DetGeomDesc>(
const_cast<DetGeomDesc*
>(
root ) );
302 std::unique_ptr<DetGeomDesc>
317 <<
">> CTPPSGeometryESModule::produceRealGD > Real geometry: " 318 << alignments->
getRPMap().size() <<
" RP and " 319 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
324 <<
">> CTPPSGeometryESModule::produceRealGD > Real geometry: No alignments applied.";
329 return std::unique_ptr<DetGeomDesc>( newGD );
334 std::unique_ptr<DetGeomDesc>
349 <<
">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: " 350 << alignments->
getRPMap().size() <<
" RP and " 351 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
355 <<
">> CTPPSGeometryESModule::produceMisalignedGD > Misaligned geometry: No alignments applied.";
360 return std::unique_ptr<DetGeomDesc>( newGD );
365 std::unique_ptr<CTPPSGeometry>
371 return std::make_unique<CTPPSGeometry>( gD.
product() );
376 std::unique_ptr<CTPPSGeometry>
382 return std::make_unique<CTPPSGeometry>( gD.
product() );
Detector ID class for TOTEM Si strip detectors.
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
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_
DetId geographicalID() const
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.
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
std::unique_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
void setGeographicalID(DetId id)
ID stuff.
const DepRecordT getRecord() const
RPAlignmentCorrectionData getFullSensorCorrection(unsigned int id, bool useRPErrors=false) 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.
Container components() const
access to the tree structure
const std::string DDD_TOTEM_TIMING_SENSOR_TMPL
std::unique_ptr< DetGeomDesc > produceRealGD(const VeryForwardRealGeometryRecord &)
A DDFilter that always returns true.
const std::string & name() const
const std::string DDD_TOTEM_RP_RP_NAME
DDD names of RP volumes.
~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 *)
components (children) management
const std::string & name() const
Returns the name.
bool get(HolderT &iHolder) const
void applyAlignment(const RPAlignmentCorrectionData &)
alignment
const std::string DDD_CTPPS_UFSD_SEGMENT_NAME
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...