Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-03-08 03:04:01

0001 #include "DataFormats/ForwardDetId/interface/BTLDetId.h"
0002 
0003 BTLDetId BTLDetId::geographicalId(CrysLayout lay) const {
0004   // For tracking geometry navigation
0005 
0006   if (lay == CrysLayout::v2 || lay == CrysLayout::v3) {
0007     // v2: set number of crystals to 17 to distinguish from crystal BTLDetId
0008     // v3: set number of crystals to 17 to distinguish from crystal BTLDetId, build V2-like type and RU number as in BTLNumberingScheme
0009     return BTLDetId(mtdSide(), mtdRR(), runitByType(), module(), modType(), kCrystalsPerModuleV2 + 1, true);
0010   }
0011   if (lay == CrysLayout::v4) {
0012     // v4: identical to v3, needed to update BTLDetId format and corresponding numbering scheme
0013     return BTLDetId(mtdSide(), mtdRR(), runit(), dmodule(), smodule(), kCrystalsPerModuleV2);
0014   }
0015   return 0;
0016 }
0017 
0018 #include <iomanip>
0019 
0020 std::ostream& operator<<(std::ostream& os, const BTLDetId& id) {
0021   os << (MTDDetId&)id;
0022   os << " BTL " << std::endl
0023      << " Side        : " << id.mtdSide() << std::endl
0024      << " Rod         : " << id.mtdRR() << std::endl
0025      << " Crystal type: " << id.modType() << std::endl
0026      << " Readout unit: " << id.runit() << std::endl
0027      << " Readout unit by type: " << id.runitByType() << std::endl
0028      << " Detector Module: " << id.dmodule() << std::endl
0029      << " Sensor Module: " << id.smodule() << std::endl
0030      << " Module      : " << id.module() << std::endl
0031      << " Crystal     : " << id.crystal() << std::endl
0032      << " Crystal in DB: " << id.crystalConsDB() << std::endl;
0033   return os;
0034 }