63 template<
typename ALIGNMENT_REC>
struct GDTokens {
78 template<
typename REC>
101 verbosity_( iConfig.getUntrackedParameter<unsigned
int>(
"verbosity") ),
117 descriptions.
add(
"DoodadESSource", desc);
129 std::deque<const DetGeomDesc*>
buffer;
130 std::deque<DetGeomDesc*> bufferNew;
131 buffer.emplace_back( &idealGD );
132 bufferNew.emplace_back( newGD );
134 while ( !buffer.empty() ) {
138 bufferNew.pop_front();
170 for (
unsigned int i = 0;
i < sD->
components().size();
i++ ) {
172 buffer.emplace_back( sDC );
178 bufferNew.emplace_back( cD );
200 const std::vector<int>& copy_num = fv->
copyNumbers();
202 if ( copy_num.size() < 3 )
203 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for strip sensor is " 204 << copy_num.size() <<
". It must be >= 3.";
207 const unsigned int decRPId = copy_num[copy_num.size() - 3];
208 const unsigned int arm = decRPId / 100;
209 const unsigned int station = ( decRPId % 100 ) / 10;
210 const unsigned int rp = decRPId % 10;
211 const unsigned int detector = copy_num[copy_num.size() - 1];
220 if ( decRPId >= 10000 ){
221 decRPId = decRPId % 10000;
222 const unsigned int armIdx = ( decRPId / 100 ) % 10;
223 const unsigned int stIdx = ( decRPId / 10 ) % 10;
224 const unsigned int rpIdx = decRPId % 10;
228 const unsigned int armIdx = ( decRPId / 100 ) % 10;
229 const unsigned int stIdx = ( decRPId / 10 ) % 10;
230 const unsigned int rpIdx = decRPId % 10;
236 const std::vector<int>& copy_num = fv->
copyNumbers();
238 if ( copy_num.size() < 4 )
239 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for TOTEM timing sensor is " 240 << copy_num.size() <<
". It must be >= 4.";
242 const unsigned int decRPId = copy_num[copy_num.size()-4];
243 const unsigned int arm = decRPId / 100,
station = ( decRPId % 100 )/10, rp = decRPId % 10;
244 const unsigned int plane = copy_num[copy_num.size()-2], channel = copy_num[copy_num.size()-1];
255 const std::vector<int>& copy_num = fv->
copyNumbers();
257 if ( copy_num.size() < 4 )
258 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for pixel sensor is " 259 << copy_num.size() <<
". It must be >= 4.";
262 const unsigned int decRPId = copy_num[copy_num.size() - 4] % 10000;
263 const unsigned int arm = decRPId / 100;
264 const unsigned int station = ( decRPId % 100 ) / 10;
265 const unsigned int rp = decRPId % 10;
266 const unsigned int detector = copy_num[copy_num.size() - 2] - 1;
272 const std::vector<int>& copy_num = fv->
copyNumbers();
274 const unsigned int id = copy_num[copy_num.size()-1];
275 const unsigned int arm = copy_num[1]-1;
276 const unsigned int station = 1;
277 const unsigned int rp = 6;
278 const unsigned int plane = (
id / 100 );
279 const unsigned int channel =
id % 100;
286 const std::vector<int>& copy_num = fv->
copyNumbers();
289 if ( copy_num.size() < 2 )
290 throw cms::Exception(
"DDDTotemRPContruction") <<
"size of copyNumbers for diamond RP is " 291 << copy_num.size() <<
". It must be >= 2.";
293 const unsigned int arm = copy_num[1] - 1;
294 const unsigned int station = 1;
295 const unsigned int rp = 6;
313 std::unique_ptr<DetGeomDesc>
324 auto root = std::make_unique<DetGeomDesc>( &fv );
333 template<
typename REC>
334 std::unique_ptr<DetGeomDesc>
336 std::optional<REC>
const& iAlignRec,
351 <<
">> "<<name<<
" > Real geometry: " 352 << alignments->
getRPMap().size() <<
" RP and " 353 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
358 <<
">> "<<name<<
" > Real geometry: No alignments applied.";
363 return std::unique_ptr<DetGeomDesc>( newGD );
366 std::unique_ptr<DetGeomDesc>
370 "CTPPSGeometryESModule::produceRealGD");
375 std::unique_ptr<DetGeomDesc>
379 "CTPPSGeometryESModule::produceMisalignedGD");
384 std::unique_ptr<CTPPSGeometry>
389 return std::make_unique<CTPPSGeometry>( &gD );
394 std::unique_ptr<CTPPSGeometry>
399 return std::make_unique<CTPPSGeometry>( &gD );
Detector ID class for TOTEM Si strip detectors.
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
bool parent()
set the current node to the parent node ...
GDTokens(edm::ESConsumesCollector &&iCC)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::string DDD_CTPPS_PIXELS_RP_NAME
CTPPSRPAlignmentCorrectionData & getRPCorrection(unsigned int id)
returns the correction value from the RP map
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
DetId geographicalID() const
nav_type copyNumbers() const
return the stack of copy numbers
std::optional< DepRecordT > tryToGetRecord() const
bool nextSibling()
set the current node to the next sibling ...
void applyAlignment(const CTPPSRPAlignmentCorrectionData &)
alignment
std::unique_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
Builds ideal, real and misaligned geometries.
const std::string DDD_TOTEM_TIMING_RP_NAME
Compact representation of the geometrical detector hierarchy.
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.
const edm::ESGetToken< DetGeomDesc, IdealGeometryRecord > idealGDToken_
static void applyAlignments(const DetGeomDesc &, const CTPPSRPAlignmentCorrectionsData *, DetGeomDesc *&)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, ALIGNMENT_REC > alignmentToken_
std::unique_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
void setGeographicalID(DetId id)
ID stuff.
const DepRecordT getRecord() const
std::unique_ptr< DetGeomDesc > produceGD(IdealGeometryRecord const &, const std::optional< REC > &, GDTokens< REC > const &, const char *name)
Geometrical description of a sensor.
const GDTokens< RPMisalignedAlignmentRecord > gdMisTokens_
const mapType & getRPMap() const
returns the map of RP alignment corrections
Container components() const
access to the tree structure
const std::string DDD_TOTEM_TIMING_SENSOR_TMPL
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< DetGeomDesc > produceRealGD(const VeryForwardRealGeometryRecord &)
CTPPSRPAlignmentCorrectionData getFullSensorCorrection(unsigned int id, bool useRPErrors=false) const
A DDFilter that always returns true.
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
const edm::ESGetToken< DetGeomDesc, VeryForwardMisalignedGeometryRecord > dgdMisToken_
const std::string & name() const
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > compactViewToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string DDD_TOTEM_RP_RP_NAME
DDD names of RP volumes.
~CTPPSGeometryESModule() override
const std::string DDD_CTPPS_DIAMONDS_RP_NAME
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< DetGeomDesc > produceMisalignedGD(const VeryForwardMisalignedGeometryRecord &)
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
CTPPSGeometryESModule(const edm::ParameterSet &)
const edm::ESGetToken< DetGeomDesc, VeryForwardRealGeometryRecord > dgdRealToken_
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 GDTokens< RPRealAlignmentRecord > gdRealTokens_
const unsigned int verbosity_
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.
const std::string DDD_CTPPS_UFSD_SEGMENT_NAME
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...