#include <AlgCutDigiPairList.h>
Inheritance diagram for AlgCutDigiPairList:

Public Member Functions | |
| AlgCutDigiPairList () | |
| virtual | ~AlgCutDigiPairList () |
| virtual void | Trace (const char *c) const |
| virtual void | RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx) |
Private Member Functions | |
| Bool_t | PassADCCut (AlgConfig &aclx, CandDigiPairHandle chh) const |
| Bool_t | PassTDCCut (AlgConfig &aclx, CandDigiPairHandle chh) const |
|
|
Definition at line 37 of file AlgCutDigiPairList.cxx. 00038 {
00039 //
00040 // Purpose: Default constructor.
00041 //
00042 // Arguments: n/a
00043 //
00044 // Return: n/a
00045 //
00046 }
|
|
|
Definition at line 50 of file AlgCutDigiPairList.cxx. 00051 {
00052 //
00053 // Purpose: Default destructor.
00054 //
00055 // Arguments: n/a
00056 //
00057 // Return: n/a
00058 //
00059 }
|
|
||||||||||||
|
Definition at line 63 of file AlgCutDigiPairList.cxx. References CandDigiPairHandle::GetCharge(), and Registry::GetDouble(). Referenced by RunAlg(). 00065 {
00066 //
00067 // Purpose: Test whether CandDigiPair passes the ADC cut.
00068 //
00069 // Arguments:
00070 // aclx in AlgConfig containing ADC threshold
00071 // chh in Handle pointing to CandDigiPair to be tested
00072 //
00073 // Return:
00074 // kTrue if either side is above threshold
00075 // kFalse if both sides are below threshold
00076 //
00077
00078 Double_t adcthr = aclx.GetDouble("ADCThreshold");
00079 Double_t adca = chh.GetCharge(StripEnd::kEast);
00080 Double_t adcb = chh.GetCharge(StripEnd::kWest);
00081 return ((adca >= adcthr) || (adcb >= adcthr));
00082 }
|
|
||||||||||||
|
Definition at line 86 of file AlgCutDigiPairList.cxx. References Registry::GetDouble(), CandDigiPairHandle::GetEastTime(), and CandDigiPairHandle::GetWestTime(). Referenced by RunAlg(). 00088 {
00089 //
00090 // Purpose: Test whether CandDigiPair passes the TDC cut.
00091 //
00092 // Arguments:
00093 // aclx in AlgConfig containing TDC threshold
00094 // chh in Handle pointing to CandDigiPair to be tested
00095 //
00096 // Return:
00097 // kTrue if both sides are below threshold
00098 // kFalse if either side is above threshold
00099 //
00100
00101 Double_t tdcthr = aclx.GetDouble("TDCThreshold");
00102 Double_t tdca = chh.GetEastTime();
00103 Double_t tdcb = chh.GetWestTime();
00104 return (TMath::Abs(tdca) <= tdcthr) && (TMath::Abs(tdcb) <= tdcthr);
00105 }
|
|
||||||||||||||||
|
Implements AlgBase. Definition at line 109 of file AlgCutDigiPairList.cxx. References CandHandle::AddDaughterLink(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), MSG, PassADCCut(), and PassTDCCut(). 00111 {
00112 //
00113 // Purpose: Apply ADC and TDC cuts to an existing CandDigiPairList to
00114 // fill a new CandDigiPairList.
00115 //
00116 // Argument:
00117 // ac in AlgConfig containing cut thresholds.
00118 // ch in Handle to the new CandDigiPairList to fill.
00119 // cx in CandContext containing the CandDigiPairList to cut.
00120 //
00121 // Return: n/a
00122 //
00123
00124 MSG("BubAlg", Msg::kVerbose)
00125 << "Starting AlgCutDigiPairList::RunAlg()" << endl;
00126
00127 // Check for CandDigiPairListHandle input.
00128 assert(cx.GetDataIn());
00129 assert(cx.GetDataIn()->InheritsFrom("CandDigiPairListHandle"));
00130 const CandDigiPairListHandle *chlh =
00131 dynamic_cast<const CandDigiPairListHandle*>(cx.GetDataIn());
00132
00133 // Iterate over CandDigiPairList daughters to fill new list.
00134 MSG("BubAlg", Msg::kVerbose) << "Create iterator." << endl;
00135 TIter chhItr(chlh->GetDaughterIterator());
00136
00137 MSG("BubAlg", Msg::kVerbose) << "Make cuts." << endl;
00138 while (CandDigiPairHandle *chh =
00139 dynamic_cast<CandDigiPairHandle *>(chhItr())) {
00140 if (PassADCCut(ac, *chh) && PassTDCCut(ac, *chh)) {
00141 ch.AddDaughterLink( *chh );
00142 }
00143 }
00144 }
|
|
|
Reimplemented from AlgBase. Definition at line 148 of file AlgCutDigiPairList.cxx. References MSG. 00149 {
00150 //
00151 // Purpose: Trace the AlgCutDigiPairList.
00152 //
00153 // Arguments:
00154 // c in String tag for the trace.
00155 //
00156 // Return: n/a
00157 //
00158
00159 MSG("BubCand", Msg::kDebug)
00160 << "**********Begin AlgCutDigiPairList::Trace(\"" << c << "\")"
00161 << endl
00162 << "**********End AlgCutDigiPairList::Trace(\"" << c << "\")"
00163 << endl;
00164 }
|
1.3.9.1