37 const EventContext& ctx = Gaudi::Hive::currentContext();
41 std::vector<const MmReadoutElement*> micromegas =
m_detMgr->getAllMmReadoutElements();
48 for (
int gasGap = 1; gasGap <= 4; ++ gasGap) {
50 10 * mm->multilayer());
53 const Acts::Surface& plane{mm->surface(mm->layerHash(
hash))};
55 const double halfX = 2.*design.
halfWidth();
56 for (
double x = -halfX;
x <= halfX;
x+= 1.*Gaudi::Units::mm){
61 }
else if (
m_testActsSurf && !plane.insideBounds(locPos.block<2,1>(0,0))) {
66 histo->Fill(globPos.x(), globPos.y());
72 std::vector<const sTgcReadoutElement*> sTgcs =
m_detMgr->getAllsTgcReadoutElements();
79 for (
int chanType : {chType::Strip, chType::Pad, chType::Wire}){
80 for (
int gasGap = 1; gasGap <= 4; ++ gasGap) {
82 10 * sTgc->multilayer());
85 const StripDesign& design{ chanType == chType::Strip? sTgc->stripDesign(
hash) :
86 chanType == chType::Wire ?
static_cast<const StripDesign&
>(sTgc->wireDesign(
hash))
88 const Acts::Surface& plane{sTgc->surface(sTgc->layerHash(
hash))};
90 const double halfX = 2.*design.
halfWidth();
91 for (
double x = -halfX;
x <= halfX;
x+= 1.*Gaudi::Units::mm){
96 }
else if (
m_testActsSurf && !plane.insideBounds(locPos.block<2,1>(0,0))) {
101 histo->Fill(globPos.x(), globPos.y());
108 std::vector<const TgcReadoutElement*> tgcs =
m_detMgr->getAllTgcReadoutElements();
115 for (
unsigned int gasGap = 1; gasGap <= tgc->nGasGaps(); ++gasGap){
116 for (
bool isStrip : {
false,
true}) {
117 int stationNameIndex = std::stoi(
m_idHelperSvc->stationNameString(tgc->identify()).substr(1,1));
119 if(!tgc->numChannels(
hash)) {
126 const Acts::Surface& plane{tgc->surface(tgc->layerHash(
hash))};
128 const double halfX = 1.5*design.
halfWidth();
129 for (
double x = -halfX;
x <= halfX;
x+= 2.*Gaudi::Units::mm){
134 }
else if (
m_testActsSurf && !plane.insideBounds(locPos.block<2,1>(0,0))) {
139 histo->Fill(globPos.x(), globPos.y());
149 return StatusCode::SUCCESS;
152 for (
unsigned int ml =1 ; ml <= 2; ++ml) {
153 for(
unsigned int active =1 ; active <= 2; ++active){
154 for (
int chanType : {chType::Strip, chType::Pad, chType::Wire}){
155 for (
unsigned int gasGap =1; gasGap <= 4; ++gasGap) {
156 std::string histoName =
"STGC_"+std::string(active == 1?
"A" :
"C") +
"M" +
157 std::to_string(ml) +
"G" + std::to_string(gasGap) +
158 + (chanType == chType::Strip?
"S" :
159 chanType == chType::Wire ?
"W" :
"P");
161 auto newHisto = std::make_unique<TH2I>(histoName.c_str(),
162 "ActiveNSW;x [mm]; y [mm]", 1000, -5001, 5001., 1000,
165 ATH_CHECK(
histSvc()->regHist(
"/GEOMODELTESTER/ActiveSurfaces/"+ histoName,std::move(newHisto)));
170 return StatusCode::SUCCESS;
174 for (
unsigned int ml = 1; ml <= 2; ++ml) {
175 for (
unsigned int active = 1; active <= 2; ++ active) {
176 for (
unsigned int gasGap = 1; gasGap <= 4; ++gasGap) {
177 std::string histoName =
"MM_"+std::string(active == 1?
"A" :
"C") +
"M" +
178 std::to_string(ml) +
"G" + std::to_string(gasGap);
179 auto newHisto = std::make_unique<TH2I>(histoName.c_str(),
180 "ActiveNSW;x [mm]; y [mm]", 1000, -5001, 5001., 1000,
183 ATH_CHECK(
histSvc()->regHist(
"/GEOMODELTESTER/ActiveSurfaces/"+ histoName,std::move(newHisto)));
187 return StatusCode::SUCCESS;
192 std::set<std::string> tgcNames;
194 tgcNames.insert(
m_idHelperSvc->stationNameString(tgc->identify()));
196 for (
unsigned int gasGap = 1; gasGap <= 3; ++gasGap){
197 for (
bool isStrip : {
false,
true}) {
198 for (
uint station: {1,2,3,4} ){
199 std::string histoName =
"TGC_T:"+ std::to_string(station) +
"G:" + std::to_string(gasGap) + (isStrip ?
"S" :
"W");
200 auto newHisto = std::make_unique<TH2I>(histoName.c_str(),
201 "ActiveTGC;x [mm]; y [mm]", 3000, -15001, 15001., 3000,
204 ATH_CHECK(
histSvc()->regHist(
"/GEOMODELTESTER/ActiveSurfaces/"+ histoName,std::move(newHisto)));
208 return StatusCode::SUCCESS;
Acts::GeometryContext context() const
static IdentifierHash constructHash(unsigned measCh, unsigned gasGap, const bool isStrip)
Constructs the Hash out of the Identifier fields (channel, gasGap, isStrip)
static IdentifierHash createHash(const unsigned int gasGap, const unsigned int channelType, const unsigned int channel, const unsigned int wireInGrp=0)
Create a measurement hash from the Identifier fields.