OV Channel Mapping Conventions

There are 4 different numbering conventions used to indicate the 64 "channels" in an OV "module":

  • Pixel #: Hamamatsu labeling physically written on the M64s (1-64).
  • Maroc2 Channel #: Convention used in the Maroc2 and FPGA firmware (0-63). Maroc2# = (64 - Pixel#)
  • UC Strip #: Convention used at the UC to number a strip within a module.
  • MC Strip #: Convention used in the MC ($DOGS_PATH/DCDB/data/Geometry) to number a strip within a module.
There are 2 different numbering conventions used to indicate the 44 (68) "modules" in the OV far (near) detector
  • UC Module #: Convention used by UC to identify a module within the OV far detector hall.
  • MC Module #: Convention used in the MC to identify a module at the far/near detector.
There is another numbering conventiono closely related to, but not exactly the same as, the number of modules
  • pmtboard_u #: Convention used in the data to identify each module AND trigger box in the OV far/near detector.

Data Format

The OV data is stored in a TClonesArray of OVHitInfo objects, each of which contains:

DC::ChNum fChNum; ///< Full channel number (including OV offset, online-based)
DC::PMTPixelNum fPMTPixelNum; ///< Full PMT pixel number (including OV offset)

UShort_t fStatus; ///< readout status mask

DC::DUQ fQ; ///< integrated digitized charge, 0 if not available
DC::PE fQPE; ///< # PE correponding to integrated charge, 0 if not available

Bool_t fWasHit; ///< true if signal above threshold and if being read out

DC::T_ns fTime; ///< Time of signal
DC::T_s fTimeUnix; ///< Unix time of signal

The fChNum variable encodes the channel of the OV signal. fChNum = DC::OV_CHANNEL_INDEX + 100*(pmtboard_u) + (Maroc2 Channel #), where DC::OV_CHANNEL_INDEX = 4000 and is defined in $DOGS_PATH/DCBase/DCEnvironment.h.

Monte Carlo Format

There are 3 separate data classes used to store simulated OV data in DOGS: OVHit, OVHitThInfo, and OVHitInfo.

OVHit (DCGLG4sim)

The OVHit class is defined in DCEvent/DCEOVHit.hh:

DC::T_ns fHitTime; ///< Time of energy deposition
DC::MEV fHitEnergy; ///< Total energy injected (truth with no scintillator physics)
UInt_t fHitID; ///< What is this??? Useful???
DC::StripNum fStripNum; ///< Strip Number
DC::L_mm fStripZ; ///< Position of energy deposition along strip-axis
DC::L_mm fX0; ///< Position of energy deposition in global frame of reference X
DC::L_mm fY0; ///< Position of energy deposition in global frame of reference Y
DC::L_mm fZ0; ///< Position of energy deposition in global frame of reference Z
UInt_t fG4GenerationID; ///< Add generated number in G4

This variable is filled in 3 steps:

  • Strip, module, and detector numbers are retrieved from the MC DB entries in $DOGS_PATH/DCDB/data/Geometry. Then an id is associated to each strip and each module in $DOGS_PATH/DCGLG4sim/src/DCGLG4_Construct_Veto.cc (via G4PVPlacement constructors) as follows:
    • strip_id = MC strip #
    • module_id = (MC det #)*100 + (MC module #)
  • A GLG4PTSDHit is assigned an ID corresponding to (module_id)*100 + strip_id in $DOGS_PATH/DCGLG4sim/GLG4sim/src/GLG4PTSD.cc.
  • An OVHit object filled with the fStripNum variable corresponding to this ID is added to the GlobalThInfo capsule in $DOGS_PATH/DCGLG4sim/ffs/MyEventAction_DOGS_ETh.cc (and presumably the other "MyEventActions" in the same folder).
In conclusion, DCGLG4sim fills GlobalThInfo with OVHit objects whose fStripNum variable is assigned as (MC det #)*10000 + (MC module #)*100+(MC strip #), where each of these variables is read from the appropriate data file in $DOGS_PATH/DCDB/data/Geometry.

OVHitThInfo

The OVHitThInfo class is defined in $DOGS_PATH/DCEvent/DCEOVHitThInfo.hh. This class defines an info capsule which is filled during the DC read-out simulation (RoSS). The OV read-out simulation is coded in a function called DoOVRoSS in $DOGS_PATH/DCRoSS/DCRRoSS.cc.

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))
      • 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
  • 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.
  • 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.

OVHitInfo

The OVHitInfo class is defined in $DOGS_PATH/DCEvent/DCEOVHitInfo.hh. This class defines the info capsule which is filled by both the DOGSifier for data and by the DC read-out simulation (RoSS) for MC. For MC, this object is filled in a function called Apply() in $DOGS_PATH/DCRoSS/DCRElectOV.cc.

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)).
    • 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)
    • 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))
  • 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 #)))).

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.

-- MattToups - 23 Feb 2011

Edit | Attach | Watch | Print version | History: r5 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2011-02-24 - MattToups
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback