Contents
Class ADCTDCMerger
java.lang.Object
org.jlab.analysis.eventmerger.ADCTDCMerger
Class for merging of ADC and TDC banks from two events
Operates on selectable list of detectors (default DC, FTOF)
- Author:
- ziegler, devita
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
class
class
-
Constructor Summary
ConstructorsConstructorDescriptionADCTDCMerger
(EventMergerConstants constants, org.jlab.io.base.DataEvent signal, List<org.jlab.io.base.DataEvent>... bgs) ADC-TDC merger tool: merges raw hits from physics and background events, accounting for pile-ups -
Method Summary
Modifier and TypeMethodDescriptionfinal List
<ADCTDCMerger.DGTZ> merge
(List<ADCTDCMerger.DGTZ> signal, List<ADCTDCMerger.DGTZ> background) Merge physics signals hit with background hitsorg.jlab.io.base.DataBank
Merge ADC banks for data (signal) and background events for the selected detector and layers In case of multiple hit on same detector element, only first hit in time is kept unless the double-hit suppression flag, suppressDoubleHits, is set to falseorg.jlab.io.base.DataBank
Merge TDC banks for data (signal) and background events for the selected detector and layers Use two background events shifted in time to extend the time range of the backgrounds Multiple hits on the same components are kept if time distance exceed the holdoff timereadADCs
(org.jlab.detector.base.DetectorType detector, org.jlab.io.base.DataBank bank) Reads ADC bank and returns list of hitsreadTDCs
(org.jlab.detector.base.DetectorType detector, org.jlab.io.base.DataBank bank) Read TDC bank and return list of hitvoid
setPreserveHitOrder
(boolean value) Set flag to control the final hit list ordervoid
setSelectedOrders
(org.jlab.detector.banks.RawBank.OrderType[] orders) Set list or order types to savevoid
setSuppressDoubleHits
(boolean value) Set pile-up operation mode: keep first hit in time if true or both if falsefinal org.jlab.io.base.DataBank
writeToBank
(org.jlab.io.base.DataEvent event, String name, List<ADCTDCMerger.DGTZ> dgtzs) Write list of hits to bank based on hit status
-
Constructor Details
-
ADCTDCMerger
public ADCTDCMerger(EventMergerConstants constants, org.jlab.io.base.DataEvent signal, List<org.jlab.io.base.DataEvent>... bgs) ADC-TDC merger tool: merges raw hits from physics and background events, accounting for pile-ups- Parameters:
constants
-signal
- physics eventsbgs
- background events
-
-
Method Details
-
setSuppressDoubleHits
public void setSuppressDoubleHits(boolean value) Set pile-up operation mode: keep first hit in time if true or both if false- Parameters:
value
-
-
setPreserveHitOrder
public void setPreserveHitOrder(boolean value) Set flag to control the final hit list order- Parameters:
value
-
-
setSelectedOrders
public void setSelectedOrders(org.jlab.detector.banks.RawBank.OrderType[] orders) Set list or order types to save- Parameters:
orders
-
-
readADCs
public List<ADCTDCMerger.DGTZ> readADCs(org.jlab.detector.base.DetectorType detector, org.jlab.io.base.DataBank bank) Reads ADC bank and returns list of hits- Parameters:
detector
- : detector identifierbank
- : selected DataBank- Returns:
- list of ADC hits
-
readTDCs
public List<ADCTDCMerger.DGTZ> readTDCs(org.jlab.detector.base.DetectorType detector, org.jlab.io.base.DataBank bank) Read TDC bank and return list of hit- Parameters:
detector
- : detector identifierbank
- : selected DataBank- Returns:
- list of TDC hits
-
mergeADCs
public org.jlab.io.base.DataBank mergeADCs(org.jlab.detector.base.DetectorType detector, List<Integer> layers) Merge ADC banks for data (signal) and background events for the selected detector and layers In case of multiple hit on same detector element, only first hit in time is kept unless the double-hit suppression flag, suppressDoubleHits, is set to false- Parameters:
detector
-layers
-- Returns:
-
mergeTDCs
public org.jlab.io.base.DataBank mergeTDCs(org.jlab.detector.base.DetectorType detector, List<Integer> layers) Merge TDC banks for data (signal) and background events for the selected detector and layers Use two background events shifted in time to extend the time range of the backgrounds Multiple hits on the same components are kept if time distance exceed the holdoff time- Parameters:
detector
-layers
-- Returns:
-
merge
public final List<ADCTDCMerger.DGTZ> merge(List<ADCTDCMerger.DGTZ> signal, List<ADCTDCMerger.DGTZ> background) Merge physics signals hit with background hits- Parameters:
signal
-background
-- Returns:
- merged list
-
writeToBank
public final org.jlab.io.base.DataBank writeToBank(org.jlab.io.base.DataEvent event, String name, List<ADCTDCMerger.DGTZ> dgtzs) Write list of hits to bank based on hit status- Parameters:
event
- hipo eventname
- bank namedgtzs
- list of hits- Returns:
- hipo bank
-