21 DelaylineNonSorting::DelaylineNonSorting()
28 typedef signals_t::iterator
sigIt_t;
37 sigIt_t iF1(f1signals.begin());
38 sigIt_t iF2 (f2signals.begin());
39 sigIt_t iS1 (s1signals.begin());
40 sigIt_t iS2 (s2signals.begin());
44 size_t minsize(f1signals.size());
45 sigIt_t sigIt(f1signals.begin());
46 sigIt_t end(f1signals.end());
47 if (minsize > f2signals.size())
49 minsize = f2signals.size();
50 sigIt = f2signals.begin();
51 end = f2signals.end();
53 if (minsize > s1signals.size())
55 minsize = s1signals.size();
56 sigIt = s1signals.begin();
57 end = s1signals.end();
59 if (minsize > s2signals.size())
61 minsize = s2signals.size();
62 sigIt = s2signals.begin();
63 end = s2signals.end();
69 for (; sigIt != end; ++sigIt, ++iF1, ++iF2, ++iS1, ++iS2)
72 const double f1 ((*iF1)[
time]);
73 const double f2 ((*iF2)[time]);
74 const double s1 ((*iS1)[time]);
75 const double s2 ((*iS2)[time]);
76 const double f ((f1-f2) *
_sf.first);
77 const double s ((s1-s2) *
_sf.second);
78 const pair<double,double> pos ((*
_poscalc)(make_pair(f,s)));
89 enum LayerComb{xy,uv,uw,vw};
92 (static_cast<DelaylineType>(s.
value(
"DelaylineType",
Hex).toInt()));
95 LayerComb lc (static_cast<LayerComb>(s.
value(
"LayersToUse",xy).toInt()));
96 if ((lc == xy) && (delaylinetype ==
Hex))
97 throw invalid_argument(
"DelaylineNonSorting::loadSettings: Error using layers xy for Hex-Detector");
98 if ((delaylinetype ==
Quad) && (lc == uv || lc == uw || lc == vw))
99 throw invalid_argument(
"DelaylineNonSorting::loadSettings: Error using layers uv, uw or vw for Quad-Detector");
105 &d.
layers()[
'X'].wireends()[
'2']),
106 make_pair(&d.
layers()[
'Y'].wireends()[
'1'],
107 &d.
layers()[
'Y'].wireends()[
'2']));
112 &d.
layers()[
'U'].wireends()[
'2']),
113 make_pair(&d.
layers()[
'V'].wireends()[
'1'],
114 &d.
layers()[
'V'].wireends()[
'2']));
119 &d.
layers()[
'U'].wireends()[
'2']),
120 make_pair(&d.
layers()[
'W'].wireends()[
'1'],
121 &d.
layers()[
'W'].wireends()[
'2']));
126 &d.
layers()[
'V'].wireends()[
'2']),
127 make_pair(&d.
layers()[
'W'].wireends()[
'1'],
128 &d.
layers()[
'W'].wireends()[
'2']));
136 _sf = make_pair(s.
value(
"ScalefactorFirstLayer",0.4).toDouble(),
137 s.
value(
"ScalefactorSecondLayer",0.4).toDouble());
std::vector< double > detectorHit_t
define a detector hit
detectorHits_t & operator()(detectorHits_t &hits)
retrieve detector hits from signals
contains classes for calculating the position in a DLD
SignalProducer::signals_t signals_t
typedefs for shorter code
file contains the classes that describe how to analyze the waveform and stores the result...
std::vector< signal_t > signals_t
std::pair< double, double > _sf
the scalefactor for the two layers (convert ns -> mm)
position calculator for hex anodes u and v layer
std::pair< std::pair< SignalProducer *, SignalProducer * >, std::pair< SignalProducer *, SignalProducer * > > _layerCombination
the layer combination
std::vector< detectorHit_t > detectorHits_t
define container for all detector hits
define which of the hitfinders defined above will be used as hit
void loadSettings(CASSSettings &, DelaylineDetector &)
load the settings of the analyzer
Average out the iShit status to get the avererage hits
position calculator for hex anodes u and v layer
anodelayers_t & layers()
return the layers
DelaylineType
the types of delayline detectors that are available
std::tr1::shared_ptr< PositionCalculator > _poscalc
the calculator to calc the position for the correlated wireend signals
signals_t::iterator sigIt_t
typedefs for shorter code
value(const QString &key, const QVariant &defaultValue=QVariant()
position calculator for hex anodes u and w layer
file contains specialized class that do the settings for cass
position calculator for quad anode
file contains the class that finds detectorhits without sorting
beginGroup(const QString &prefix)
Base class for all detector analyzers.