|
META TOPICPARENT |
name="MattToups" |
OV Channel Mapping Conventions |
|
OVHitThInfo objects are filled as follows:
- The fStripNum variable is retrieved from each OVHit object stored in GlobalThInfo.
|
|
< < |
-
- Module lengths are decoded from fStripNum via Geo::GetME()->GetOVMStripLength(Geo::GetME()->DecodeModuleOV(numStrip))
|
> > |
-
- Module lengths are decoded from fStripNum via Geo::GetME()->GetOVMStripLength(Geo::GetME()->DecodeModuleOV(numStrip))
|
|
-
-
- These module lengths then affect the attenuation and light propagation corrections which are applied to the MC
- The fStripNum variable is passed to Calib in 2 separate calls:
|
|
< < |
-
-
- Calib::GetME()->GetMeV2PEOV(myOVH->GetE(), numStrip) and
- Calib::GetME()->OVAttenuation(fiber_l, numStrip), where fiber_l depends on the module length
|
> > |
-
-
- Calib::GetME()->GetMeV2PEOV(myOVH->GetE(), numStrip) and
- Calib::GetME()->OVAttenuation(fiber_l, numStrip), where fiber_l depends on the module length
|
|
- The "hitchan" is determined from fStripNum via Geo::GetME()->Strip2Channel(numStrip);
- There are conversions between this "hitchan" and "pixel #" which must be self-consistent. They are called in DoOVRoSS_map_lightdist.
|
|
< < |
-
-
- const Pixel pixnum = Geo::GetME()->DecodePixelOV(hitchan),
- const PMTNum pmtnum = Geo::GetME()->DecodePMTOV(hitchan), and
- const ChNum channel = Geo::GetME()->DecodeChOV(pmtnum, xpix), where xpix is of the same type as pixnum.
|
> > |
-
-
- const Pixel pixnum = Geo::GetME()->DecodePixelOV(hitchan),
- const PMTNum pmtnum = Geo::GetME()->DecodePMTOV(hitchan), and
- const ChNum channel = Geo::GetME()->DecodeChOV(pmtnum, xpix), where xpix is of the same type as pixnum.
|
|
- The OV pulse info is then added to the FEE PMT pulse repository via FEE::AddOVPulse(), indexed by this "hitchan"
- Finally, the OVHitThInfo is added via ElectOV::GetME()->AddOVHitThInfo(), again indexed by this "hitchan"
In conclusion, the OVHitThInfo objects are filled with Geo::GetME()->Strip2Channel( (MC det #)*10000 + (MC module #)*100+(MC strip #) ). In order for DoOVRoSS to function correctly, there are also internal mapping functions and interfaces to Calib which must be maintained. |
|
In this file, OVHitInfo objects are filled as follows:
- The "hitchan" is retrieved from the pulses in the FEE repository
|
|
< < |
- This is converted into a "module number" via Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip(hitchan)).
|
> > |
- This is converted into a "module number" via Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip(hitchan)).
|
|
-
- These "module numbers" are then used to organize the application of OV readout schemes (including edge strip readout described later)
|
|
< < |
- Then, a "LocalStripNumber" is determined from the "hitchan" via Geo::GetME()->DecodeLocalStripOV(Geo::GetME()->Channel2Strip(hitchan)).
- Readout conditions are then enforced via Geo::GetME()->GetOVMuLikeNeighbor1(LocalStripNumber)
|
> > |
- Then, a "LocalStripNumber" is determined from the "hitchan" via Geo::GetME()->DecodeLocalStripOV(Geo::GetME()->Channel2Strip(hitchan)).
- Readout conditions are then enforced via Geo::GetME()->GetOVMuLikeNeighbor1(LocalStripNumber)
|
|
-
- These local strip numbers must correspond to a specific geometry for GetOVMuLikeNeighbor* to function properly (commented in function).
- For non-edge strip packets, "hitchan" is propagated directly to the OVHitInfo object if the readout conditions are satisfied.
|
|
< < |
- A separate Trigger Box section simulates the readout of edge strips. The following functions depend on the "module number" obtained via Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip(hitchan)):
- myTrigBox1 = Geo::GetME()->GetOVMTrigBox(myMod1);
- ElectOV::LowerLeftEdgeFirmware(Geo::GetME()->GetOVMTrigChan(myMod1),Geo::GetME()->GetOVMTrigChan(myMod2))
|
> > |
- A separate Trigger Box section simulates the readout of edge strips. The following functions depend on the "module number" obtained via Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip(hitchan)):
- myTrigBox1 = Geo::GetME()->GetOVMTrigBox(myMod1);
- ElectOV::LowerLeftEdgeFirmware(Geo::GetME()->GetOVMTrigChan(myMod1),Geo::GetME()->GetOVMTrigChan(myMod2))
|
|
- Finally, OVHitInfo objects are created for the edge strip packets. Since edge strip packets are special, we build the final channel as:
- chan = DC::OV_CHANNEL_INDEX+100*Geo::GetME()->GetOVMTrigBox(myMod)+(myMod), where myMod=Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip(hitchan)).
|
|
< < | In conclusion, the OVHitInfo objects for non-edge-strip packets are filled with Geo::GetME()->Strip2Channel( (MC det #)*10000 + (MC module #)*100+(MC strip #) ). On the other hand, edge-strips packets are filled with DC::OV_CHANNEL_INDEX + 100*Geo::GetME()->GetOVMTrigBox(Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip( Geo::GetME()->Strip2Channel((MC det #)*10000 + (MC module #)*100+(MC strip #))))) + Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip( Geo::GetME()->Strip2Channel( (MC det #)*10000 + (MC module #)*100+(MC strip #)))). |
> > | In conclusion, the OVHitInfo objects for non-edge-strip packets are filled with Geo::GetME()->Strip2Channel( (MC det #)*10000 + (MC module #)*100+(MC strip #) ). On the other hand, edge-strips packets are filled with DC::OV_CHANNEL_INDEX + 100*Geo::GetME()->GetOVMTrigBox(Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip( Geo::GetME()->Strip2Channel( (MC det #)*10000 + (MC module #)*100+(MC strip #))))) + Geo::GetME()->DecodeModuleOV(Geo::GetME()->Channel2Strip( Geo::GetME()->Strip2Channel( (MC det #)*10000 + (MC module #)*100+(MC strip #)))). |
|
These are both wrong, as you can verify by comparing with the channel numbering given in the data format above. |
|
< < | Conclusion
There is a lot we need to clean up. |
> > | DCGeo
-
- Bool_t StripWithinOV(const DC::StripNum stp) const
- return this->ChWithinOV(stp+dCH_OFFSET_OV);
- Bool_t ChWithinOV(const DC::ChNum ch) const
- if(ch<dCH_OFFSET_OV || ch>2*dCH_OFFSET_OV) return false
- if(this->DecodeDetFromChOV(ch) == DCDetector::kUnknownDET) return false;
- if(this->PixelWithinOV(this->DecodePixelOV(ch))) return false;
- if(this->PMTWithinOV(this->DecodePMTOV(ch))) return false;
- return true;
- DCDetector::Detector_t DecodeDetFromChOV(const DC::ChNum ch) const
- if((ch-dCH_OFFSET_OV)/10000 == 1) return DCDetector::kFAR;
- else if ((ch-dCH_OFFSET_OV)/10000 == 2) return DCDetector::kNEAR;
- else return DCDetector::kUnknownDET;
- DC::Pixel DecodePixelOV(const DC::ChNum ch) const
- return (DC::Pixel) ch%100;
- DC::PMTNum DecodePMTOV(const DC::ChNum ch) const
- return (ch - dCH_OFFSET_OV)/100;
- Bool_t PixelWithinOV(const DC::Pixel pixel) const
- return (pixel < dSTRIPSperMODULE);
- Bool_t PMTWithinOV(const DC::PMTNum pmt) const
- return (pmt%100 < this->GetPMT_OV(this->DecodeDetFromPMTOV(pmt)));
- DCDetector::Detector_t DecodeDetFromPMTOV(const DC::PMTNum pmt) const
- return this->DecodeDetFromChOV((DC::ChNum) (pmt*100 + dCH_OFFSET_OV) );
- DCDetector::Detector_t DecodeDetFromChOV(const DC::ChNum ch) const;
- if((ch-dCH_OFFSET_OV)/10000 == 1) return DCDetector::kFAR;
- else if ((ch-dCH_OFFSET_OV)/10000 == 2) return DCDetector::kNEAR;
- else return DCDetector::kUnknownDET;
- DC::PMTNum GetPMT_OV(const DCDetector::Detector_t det) const
- return this->GetModule_OV(det);
- DC::PMTNum GetModule_OV(const DCDetector::Detector_t det) const
- if(det==DCDetector::kFAR) return dMODULE_OUTVETOFD_MAX;
- else if(det == DCDetector::kNEAR) return dMODULE_OUTVETOND_MAX;
- else return 0;
-
- DC::ChNum Strip2Channel(const DC::StripNum stp) const
- If(this->StripWithinOV(stp)
return this->DecodeChOV((DC::PMTNum)this->DecodeModuleOV(stp),fStrip2PixelDB[this->DecodeLocalStripOV(stp)]);
- DC::ModuleNum DecodeModuleOV(const DC::StripNum stp) const
- return (DC::ModuleNum) stp/100;
- DC::StripNum DecodeLocalStripOV(const DC::StripNum stp) const
- return (DC::StripNum) stp%100;
- DC::ChNum DecodeChOV(const DC::PMTNum pmt, const DC::Pixel pixel) const
- if(this->PixelWithinOV(pixel) && this->PMTWithinOV(pmt)) return (100*pmt + dCH_OFFSET_OV + pixel);
-
- DC::StripNum Channel2Strip(const DC::ChNum ch) const
- if(this->ChWithinOV(ch)) {
for(UInt_t i=0;i<dSTRIPSperMODULE; i++) { if(fStrip2PixelDB[i] == this->DecodePixelOV(ch)) return this->DeocdeStripOV(this->DecodePMTOV(ch),i); } return 9999; } else return 9999;
- DC::ChNum DecodeStripOV(const DC::ModuleNum mod, const DC::StripNum stp) const
- if(this->PixelWithinOV(stp%100) && this->PMTWithinOV(mod)) return (mod*100 + stp);
-
Conclusions
- DCGeo assumes:
- PMT == module
- 1-to-1 mapping fStrip2Pixel[64]: pixel <-> (local strip)
- Channel = (100*module#) + pixel + dCH_OFFSET_OV
- Strip = (100*module#) + (local strip)
- module = (100*det#) + detector-specific module
- The number of channels is between dCH_OFFSET_OV and 2*dCH_OFFSET_OV
- This is wrong because
- There are more PMTs (boards) than (physical) modules and therefore
- There are more channels than strips
- The offset that should be used is DC::OV_CHANNEL_INDEX and for this offset the number of OV channels is not between DC::OV_CHANNEL_INDEX and 2*DC::OV_CHANNEL_INDEX.
-
Implications
- The ChWithinOV and StripWithinOV functions should be separated
- DCGeo should be able to access and apply the mapping between module # and pmtboard_u.
- Information about about the detector should be added to the data stream.
- dCH_OFFSET_OV or DC::OV_CHANNEL_INDEX?
- Verify that "pixel" in the DB refers to MAROC2 CHANNEL
- How should DCCalib access OV data? At the OVHit level?
- A call to Geo::GetME()->GetOVMTrigChan() should be added to the section of DCRElectoOV where OVHitInfo objects for edge strips packets are created.
|
| -- MattToups - 23 Feb 2011
\ No newline at end of file |