Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:08

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::barphiflat) {
0007     // barphiflat: count modules in a rod, combining all types
0008     return BTLDetId(mtdSide(), mtdRR(), module() + kModulePerTypeBarPhiFlat * (modType() - 1), 0, 1);
0009   } else if (lay == CrysLayout::v2 || lay == CrysLayout::v3) {
0010     // v2: set number of crystals to 17 to distinguish from crystal BTLDetId
0011     // v3: set number of crystals to 17 to distinguish from crystal BTLDetId, build V2-like type and RU number as in BTLNumberingScheme
0012     return BTLDetId(mtdSide(), mtdRR(), runit(), module(), modType(), kCrystalsPerModuleV2 + 1);
0013   }
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      << " Global RU   : " << id.globalRunit() << std::endl
0028      << " Module      : " << id.module() << std::endl
0029      << " Crystal     : " << id.crystal() << std::endl;
0030   return os;
0031 }