CFEL - ASG Software Suite  2.5.0
CASS
partial_covariance.h
Go to the documentation of this file.
1 // Copyright (C) 2012 Koji Motomura
2 
3 /**
4  * @file partial_covariance.h processors to calculate partical covariance
5  *
6  * @author Koji Motomura
7  */
8 
9 #ifndef __PARTIAL_COVARIANCE_H__
10 #define __PARTIAL_COVARIANCE_H__
11 
12 #include "processor.h"
13 #include "cass_event.h"
14 
15 
16 namespace cass
17 {
18 
19 /** converts a Electron Time of Flight trace to Energy
20  *
21  * @PPList "400": converts a Electron Time of Flight trace to Energy
22  *
23  * converts a time of flight trace of electrons to the coresponding energy
24  * using function \f$E = (\frac{\alpha}{(t-t_0)})^2-e_0\f$.
25  *
26  * @note One Energy point is created from many points in the ToF trace. This
27  * means that one has make sure that the Baseline is correct. Therefore
28  * this will determine the baseline first. One has to tell it the ToF
29  * region where no signal will appear, such that it can correctly
30  * determine the baseline.
31  *
32  * @cassttng Processor/\%name\%/{TofLow|TofUp}\n
33  * The time of flight range within the histogram to convert to energy.
34  * Default is 0|1.
35  * @cassttng Processor/\%name\%/{t0}\n
36  * corrects the time of flight
37  * Default is 0.
38  * @cassttng Processor/\%name\%/{e0}\n
39  * Retard voltage
40  * Default is 0.
41  * @cassttng Processor/\%name\%/{alpha}\n
42  * Coefficient for converting to energy. Default is 0.
43  * @cassttng Processor/\%name\%/{NbrBins}\n
44  * number of bins in converted histogram. Default is 0.
45  * @cassttng Processor/\%name\%/{tb1}\n
46  * The lower limit in x for calculating the baseline. Default is 0.
47  * @cassttng Processor/\%name\%/{tb2}\n
48  * The upper limit in x for calculating the baseline. Default is 0.
49  * @cassttng Processor/\%name\%/{TofName}\n
50  * input 1D histogram that contains the time of flight wavetrace.
51  *
52  * @author Koji Motomura
53  */
54 class pp400 : public Processor
55 {
56 public:
57  /** constructor */
58  pp400(const name_t &);
59 
60  /** process event */
61  virtual void process(const CASSEvent&, result_t&);
62 
63  /** load the settings of the pp */
64  virtual void loadSettings(size_t);
65 
66 protected:
67  /** retrieve the time that corresponses to a given energy
68  *
69  * calculate the time using function
70  * \f$t=\frac{\alpha}{\sqrt{e+e_0}}+t_0\f$.
71  *
72  * @return the calculated time
73  * @param energy the energy that one wants to calc the time for
74  */
75  double calcEtoTof (double energy);
76 
77  /** make the histgram in energy scale.
78  *
79  * This function makes the histgram in energy scale.
80  * Offset value is calculated by average in range of no signal.
81  *
82  * @param TofHisto input ToF histgram
83  * @param Energy result histgram converted to energy
84  * @param offset baseline of wavetrace
85  */
86  void ToftoEnergy(const result_t& TofHisto,
87  result_t& Energy,
88  double offset);
89 
90  /** pp containing input histogram */
92 
93  /** the user requested Tof-axis limits */
94  std::pair<float,float> _userTofRange;
95 
96  /** corrects the time of flight*/
97  double t0;
98 
99  /** retardation voltage*/
100  double e0;
101 
102  /** Coefficient to convert to energy*/
103  double alpha;
104 
105  /** The lower limit for calculating baseline*/
106  double tb1;
107 
108  /** The upper limit for calculating baseline*/
109  double tb2;
110 
111  /** the calculated level of baseline*/
112  double offset;
113 
114  /** number of bins in converted histgram*/
115  size_t NbrBins;
116 
117  /** Upper limit converted to bin*/
118  size_t binTofUp;
119 
120  /** lower limit converted to bin*/
121  size_t binTofLow;
122 
123  /** t0 converted to bin*/
124  size_t bint0;
125 
126  /** tb1 converted to bin*/
127  size_t bintb1;
128 
129  /** tb2 converted to bin*/
130  size_t bintb2;
131 };
132 
133 
134 
135 
136 
137 
138 
139 /** convert time of flight to charge to mass ratio
140  *
141  * @PPList "404": convert time of flight to charge to mass ratio
142  *
143  * converts a time of flight trace of ions to the coresponding mass to charge
144  * ratio.
145  *
146  * In order to calculate the Mass to Charge ratio one has to provide two known
147  * peaks and their Charge to Mass ratio. From this information the rest is
148  * calculated.
149  *
150  * @cassttng Processor/\%name\%/{TofLow|TofLow}\n
151  * The time of flight range within the histogram to convert to mass.
152  * to charge ratio Default is 0|1.
153  * @cassttng Processor/\%name\%/{t0}\n
154  * a time of flight of ion that we choosed. Default is 0.
155  * @cassttng Processor/\%name\%/{t1}\n
156  * another time of flight of ion that we choosed. Default is 0.
157  * @cassttng Processor/\%name\%/{MtC0}\n
158  * mass to charge ratio of t0. Default is 0.
159  * @cassttng Processor/\%name\%/{MtC1}\n
160  * mass to charge ratio of t1. Default is 0.
161  * @cassttng Processor/\%name\%/{tb1}\n
162  * The lower limit for calculating baseline. Default is 0.
163  * @cassttng Processor/\%name\%/{tb2}\n
164  * The upper limit for calculating baseline. Default is 0.
165  * @cassttng Processor/\%name\%/{NbrBins}\n
166  * number of bins in converted histogram. Default is 0.
167  *
168  * @author Marco Siano
169  */
170 class pp404 : public Processor
171 {
172 public:
173  /** constructor */
174  pp404(const name_t &);
175 
176  /** process event */
177  virtual void process(const CASSEvent&, result_t&);
178 
179  /** load the settings of the pp */
180  virtual void loadSettings(size_t);
181 
182 protected:
183  /** pp containing input histogram */
185 
186  /** the user requested Tof-axis limits */
187  std::pair<float,float> _userTofRange;
188 
189  /** calculate the tof from the mass to charge ratio
190  *
191  * \f$t=\alpha\sqrt{\frac{M}{Q}}+\beta\f$
192  *
193  * @return the time of flight corresponding to the m to q ratio.
194  * @param MasstoCharge the m to q ratio
195  */
196  double calcMtCtoTof (double MasstoCharge);
197 
198  /** convert Time of Flight to mass to charge ratio
199  *
200  * \f$\frac{M}{Q}=(\frac{t}{\alpha}-\beta)^2\f$
201  *
202  * @return m to q ratio
203  * @param Timeoflight
204  */
205  double calcToftoMtC (double Timeoflight);
206 
207  /** create m to q histogram from ToF histogram
208  *
209  * this is using the function pp404::calcMtCtoTof and pp404::calcToftoMtC to
210  * do the conversion.
211  *
212  * @param hist the tof histogram to calc the m to q ration from
213  * @param MtC the resulting m to q histogram storage
214  * @param offset the offset of the baseline
215  */
216  void ToftoMtC(const result_t& hist ,
217  result_t& MtC,
218  double offset);
219 
220  /** a time of flight of ion that we choosed */
221  double t0;
222 
223  /** mass to charge ratio of t0 */
224  double MtC0;
225 
226  /** another time of flight of ion that we choosed */
227  double t1;
228 
229  /** mass to charge ratio of t1 */
230  double MtC1;
231 
232  /** \f$\alpha=\frac{t_1-t_0}{\sqrt{MtC1}-\sqrt{MtC0}}\f$ */
233  double alpha;
234 
235  /** \f$\beta=t_1-\alpha\sqrt{MtC1}\f$ */
236  double beta;
237 
238  /** The lower limit for calculating baseline*/
239  double tb1;
240 
241  /** The upper limit for calculating baseline*/
242  double tb2;
243 
244  /** number of bins in converted histgram*/
245  size_t NbrBins;
246 
247  /** Upper limit converted to bin*/
248  size_t binTofUp;
249 
250  /** lower limit converted to bin*/
251  size_t binTofLow;
252 
253  /** tb1 converted to bin*/
254  size_t bintb1;
255 
256  /** tb2 converted to bin*/
257  size_t bintb2;
258 };
259 
260 
261 
262 
263 
264 
265 
266 
267 /** calc the pulse duration from the bld
268  *
269  * @PPList "405": pulse duration from the bld
270  *
271  * get the duration value of FEL pulse from beam line data base.
272  *
273  * @author Koji Motomura
274  */
275 class pp405 : public Processor
276 {
277 public:
278  /** constructor */
279  pp405(const name_t &);
280 
281  /** calc the pulse duration from the bld */
282  virtual void process(const CASSEvent&, result_t&);
283 
284  /** load the settings from cass.ini */
285  virtual void loadSettings(size_t);
286 };
287 
288 
289 
290 
291 
292 
293 
294 
295 
296 /** Tof to Energy correct from 0D histogram
297  *
298  * @PPList "406": Tof to Energy correct from 0D histogram
299  *
300  * converts a time of flight trace of electrons to the coresponding energy with
301  * correction from 0D histogram, using function
302  * \f$e = (\frac{\alpha}{t-t_0})^2-e_0\f$.
303  *
304  * @cassttng Processor/\%name\%/{TofLow|TofUp}\n
305  * The time of flight range within the histogram to convert to energy.
306  * Default is 0|1.
307  * @cassttng Processor/\%name\%/{t0}\n
308  * corrects the time of flight. Default is 0.
309  * @cassttng Processor/\%name\%/{e0}\n
310  * Retardation voltage. Default is 0.
311  * @cassttng Processor/\%name\%/{alpha}\n
312  * Coefficient for converting to energy. Default is 0.
313  * @cassttng Processor/\%name\%/{NbrBins}\n
314  * number of bins in converted histogram. Default is 0.
315  * @cassttng Processor/\%name\%/{tb1}\n
316  * The lower limit for calculating baseline. Default is 0.
317  * @cassttng Processor/\%name\%/{tb2}\n
318  * The upper limit for calculating baseline. Default is 0.
319  * @cassttng Processor/\%name\%/{TofName}\n
320  * input 1D histogram that is the time of flight wavetrace.
321  * @cassttng Processor/\%name\%/{HistZeroD}\n
322  * input 0D histogram for enegy correction.
323  *
324  * @author Koji Motomura
325  * @author Marco Siano
326  */
327 class pp406 : public Processor
328 {
329 public:
330  /** constructor */
331  pp406(const name_t &);
332 
333  /** process event */
334  virtual void process(const CASSEvent&, result_t&);
335 
336  /** load the settings of the pp */
337  virtual void loadSettings(size_t);
338 
339 protected:
340  /** pp containing input histogram */
342 
343  /** pp containing input OD histogram */
345 
346  /** the user requested Tof-axis limits */
347  std::pair<float,float> _userTofRange;
348 
349  /** corrects the time of flight*/
350  double t0;
351 
352  /** retardation voltage*/
353  double e0;
354 
355  /** Coefficient to convert to energy*/
356  double alpha;
357 
358  /** The lower limit for calculating baseline*/
359  double tb1;
360 
361  /** The upper limit for calculating baseline*/
362  double tb2;
363 
364  /** corrects from photon energy value*/
365  double ediff;
366 
367  /** number of bins in converted histgram*/
368  size_t NbrBins;
369 
370  /** Upper limit converted to bin*/
371  size_t binTofUp;
372 
373  /** lower limit converted to bin*/
374  size_t binTofLow;
375 
376  /** t0 converted to bin*/
377  size_t bint0;
378 
379  /** tb1 converted to bin*/
380  size_t bintb1;
381 
382  /** tb2 converted to bin*/
383  size_t bintb2;
384 
385  /** retrieve the time that corresponses to a given energy
386  *
387  * calculate the time using function \f$t=\frac{\alpha}{\sqrt{e+e_0}}+t_0\f$.
388  *
389  * @return the calculated time
390  * @param energy the energy that one wants to calc the time for
391  */
392  double calcEtoTof(double energy);
393 
394  /** make the histogram in energy scale.
395  *
396  * This function makes the histgram in energy scale. Offset value is
397  * calculated by average in range of no signal.
398  *
399  * @param TofHisto input ToF histgram
400  * @param Energy result histgram converted to energy
401  * @param offset baseline of wavetrace
402  */
403  void ToftoEnergy(const result_t& TofHisto,
404  result_t& Energy,
405  double offset );
406 };
407 
408 
409 
410 
411 
412 
413 
414 
415 /** Tof to Energy linear interpolation
416  *
417  * @PPList "407": Tof to Energy linear interpolation
418  *
419  * converts a time of flight trace of electrons to the coresponding energy
420  * using fuction \f$e=(\frac{\alpha}{t-t_0})^2-e_0\f$ and apply linear
421  * interpolation to energy spectrum.
422  *
423  * @cassttng Processor/\%name\%/{TofLow|TofUp}\n
424  * The time of flight range within the histogram to convert to energy.
425  * Default is 0|1.
426  * @cassttng Processor/\%name\%/{t0}\n
427  * corrects the time of flight. Default is 0.
428  * @cassttng Processor/\%name\%/{e0}\n
429  * Retardation voltage. Default is 0.
430  * @cassttng Processor/\%name\%/{alpha}\n
431  * Coefficient for converting to energy. Default is 0.
432  * @cassttng Processor/\%name\%/{NbrBins}\n
433  * number of bins in converted histogram. Default is 0.
434  * @cassttng Processor/\%name\%/{tb1}\n
435  * The lower limit for calculating baseline. Default is 0.
436  * @cassttng Processor/\%name\%/{tb2}\n
437  * The upper limit for calculating baseline. Default is 0.
438  * @cassttng Processor/\%name\%/{TofName}\n
439  * input 1D histogram that is the time of flight wavetrace.
440  * @cassttng Processor/\%name\%/{HistZeroD}\n
441  * input 0D histogram for enegy correction.
442  *
443  * @author Koji Motomura
444  * @author Marco Siano
445  */
446 class pp407 : public Processor
447 {
448 public:
449  /** constructor */
450  pp407(const name_t &);
451 
452  /** process event */
453  virtual void process(const CASSEvent&, result_t&);
454 
455  /** load the settings of the pp */
456  virtual void loadSettings(size_t);
457 
458 protected:
459  /** pp containing input histogram */
461 
462  /** the user requested Tof-axis limits */
463  std::pair<float,float> _userTofRange;
464 
465  /** retrieve the time that corresponses to a given energy
466  *
467  * calculate the time using function. \f$t=\frac{\alpha}{\sqrt{e+e_0}}+t_0\f$.
468  *
469  * @return the calculated time
470  * @param energy the energy that one wants to calc the time for
471  */
472  double calcEtoTof (double energy);
473 
474  /** retrieve the linear interpolation value
475  *
476  * calculate the signal height at tofPos when it is interpolated
477  *
478  * @return the signal height
479  * @param tofPos a time that we want to know interpolated value
480  * @param binlow bin value at lower side
481  * @param bin_size the bin size of energy histogram
482  * @param TofHisto ToF wavetrace
483  */
484  double calcTofValue(const double tofPos, const size_t binlow ,
485  const double bin_size, const result_t& TofHisto);
486 
487  /** make the histgram in energy scale.
488  *
489  * This function makes the histgram in energy scale. Offset value is
490  * calculated by average in range of no signal.
491  *
492  * @param TofHisto input ToF histgram
493  * @param Energy result histgram converted to energy
494  * @param offset baseline of wavetrace
495  */
496  void ToftoEnergy(const result_t& TofHisto,
497  result_t& Energy,
498  double offset);
499 
500  /** corrects the time of flight*/
501  double t0;
502 
503  /** retardation voltage*/
504  double e0;
505 
506  /** Coefficient to convert to energy*/
507  double alpha;
508 
509  /** The lower limit for calculating baseline*/
510  double tb1;
511 
512  /** The upper limit for calculating baseline*/
513  double tb2;
514 
515  /** number of bins in converted histgram*/
516  size_t NbrBins;
517 
518  /** Upper limit converted to bin*/
519  size_t binTofUp;
520 
521  /** lower limit converted to bin*/
522  size_t binTofLow;
523 
524  /** t0 converted to bin*/
525  size_t bint0;
526 
527  /** tb1 converted to bin*/
528  size_t bintb1;
529 
530  /** tb2 converted to bin*/
531  size_t bintb2;
532 };
533 
534 
535 
536 
537 
538 
539 
540 
541 /** Tof to Energy linear interpolation and correct from 0d histogram
542  *
543  * @PPList "408": Tof to Energy linear interpolation and correct from 0d histogram
544  *
545  * converts a time of flight trace of electrons to the coresponding energy and
546  * apply linear interpolation to energy spectrum using fuction
547  * \f$e=(\frac{\alpha}{t-t_0})^2-e_0\f$.
548  *
549  * @cassttng Processor/\%name\%/{TofLow|TofUp}\n
550  * The time of flight range within the histogram to convert to energy.
551  * Default is 0|1.
552  * @cassttng Processor/\%name\%/{t0}\n
553  * corrects the time of flight. Default is 0.
554  * @cassttng Processor/\%name\%/{e0}\n
555  * Retardation voltage. Default is 0.
556  * @cassttng Processor/\%name\%/{alpha}\n
557  * Coefficient for converting to energy. Default is 0.
558  * @cassttng Processor/\%name\%/{NbrBins}\n
559  * number of bins in converted histogram. Default is 0.
560  * @cassttng Processor/\%name\%/{tb1}\n
561  * The lower limit for calculating baseline. Default is 0.
562  * @cassttng Processor/\%name\%/{tb2}\n
563  * The upper limit for calculating baseline. Default is 0.
564  * @cassttng Processor/\%name\%/{TofName}\n
565  * input 1D histogram that is the time of flight wavetrace.
566  * @cassttng Processor/\%name\%/{HistZeroD}\n
567  * input 0D histogram for enegy correction.
568  *
569  * @author Koji Motomura
570  * @author Marco Siano
571  */
572 class pp408 : public Processor
573 {
574 public:
575  /** constructor */
576  pp408(const name_t &);
577 
578  /** process event */
579  virtual void process(const CASSEvent&, result_t&);
580 
581  /** load the settings of the pp */
582  virtual void loadSettings(size_t);
583 
584 protected:
585  /** pp containing input histogram */
587 
588  /** pp containing input OD histogram */
590 
591  /** the user requested Tof-axis limits */
592  std::pair<float,float> _userTofRange;
593 
594  /** retrieve the time that corresponses to a given energy
595  *
596  * calculate the time using function \f$t=\frac{\alpha}{\sqrt{e+e_0}}+t_0\f$.
597  *
598  * @return the calculated time
599  * @param energy the energy that one wants to calc the time for
600  */
601  double calcEtoTof (double energy);
602 
603  /** retrieve the linear interpolation value
604  *
605  * calculate the signal height at tofPos when it is interpolated
606  *
607  * @return height of signal
608  * @param tofPos a time that we want to know interpolated value
609  * @param binlow bin value at lower side
610  * @param bin_size the bin size of energy histogram
611  * @param TofHisto ToF wavetrace
612  */
613  double calcTofValue(const double tofPos, const size_t binlow ,
614  const double bin_size, const result_t& TofHisto);
615 
616  /** make the histogram in energy scale.
617  *
618  * This function makes the histgram in energy scale. Offset value is
619  * calculated by average in range of no signal.
620  *
621  * @param TofHisto input ToF histgram
622  * @param Energy result histgram converted to energy
623  * @param offset baseline of wavetrace
624  */
625  void ToftoEnergy(const result_t& TofHisto,
626  result_t& Energy,
627  double offset );
628 
629  /** corrects the time of flight*/
630  double t0;
631 
632  /** retardation voltage*/
633  double e0;
634 
635  /** Coefficient to convert to energy*/
636  double alpha;
637 
638  /** The lower limit for calculating baseline*/
639  double tb1;
640 
641  /** The upper limit for calculating baseline*/
642  double tb2;
643 
644  /** difference from expected energy*/
645  double ediff;
646 
647  /** number of bins in converted histgram*/
648  size_t NbrBins;
649 
650  /** Upper limit converted to bin*/
651  size_t binTofUp;
652 
653  /** lower limit converted to bin*/
654  size_t binTofLow;
655 
656  /** t0 converted to bin*/
657  size_t bint0;
658 
659  /** tb1 converted to bin*/
660  size_t bintb1;
661 
662  /** tb2 converted to bin*/
663  size_t bintb2;
664 };
665 
666 
667 
668 
669 
670 
671 
672 
673 
674 
675 /** Covariance map
676  *
677  * @PPList "410":Covariance map
678  *
679  * calculate the covariance by this on-line algorithm
680  * \f$cov_n=((n-1)cov_{n-1}+(x_n-aveX_n))(y_n-aveY_{n-1})))\f$
681  * and makes 2d map from 1d histogram.
682  *
683  * @cassttng Processor/\%name\%/{InputName}\n
684  * input 1D histogram that we calculate covariance map.
685  * @cassttng Processor/\%name\%/{AveInputName}\n
686  * averaged histogram of "InputName"
687  *
688  * @author Koji Motomura
689  */
691 {
692 public:
693  /** constructor */
694  pp410(const name_t &);
695 
696  /** process event */
697  virtual void process(const CASSEvent&, result_t&);
698 
699  /** load the settings */
700  virtual void loadSettings(size_t);
701 
702 protected:
703  /** pp containing histogram to work on */
705 
706  /** pp containing input histogram */
708 
709  /** calculate the covariance map
710  *
711  * calculate by on-line algorithm and makes 2d map
712  *
713  * @param data input histogram
714  * @param averageOld averaged histgram at previous event
715  * @param averageNew averaged histgram at present event
716  * @param variance output histogram calculated variance
717  * @param n number of present event
718  */
719  void calcCovariance(const result_t& data ,
720  const result_t::storage_t &averageOld,
721  const result_t& averageNew,
722  result_t& variance, float n);
723 
724 };
725 
726 
727 
728 
729 
730 /** calculate intensity correction
731  *
732  * @PPList "412": calculate intensity correction of covariance map
733  *
734  * calculate the covariance between wavetrace and intensity
735  * by on-line algorithm
736  * \f$cov_n=\frac{1}{n}((n-1)cov_{n-1}+(x_n-aveX_n))(y_n-aveY_{n-1}))\f$
737  *
738  * @cassttng Processor/\%name\%/{TofName}\n
739  * input 1D histogram that is the time of flight wavetrace.
740  * @cassttng Processor/\%name\%/{AveTofName}\n
741  * input 1D averaged histogram that is the time of flight wavetrace.
742  * @cassttng Processor/\%name\%/{IntensityName}\n
743  * input 1D histogram that is intensity.
744  * @cassttng Processor/\%name\%/{AveIntensityName}\n
745  * input 0D averaged histogram that is intensity.
746  *
747  * @author Koji Motomura
748  */
750 {
751 public:
752  /** constructor */
753  pp412(const name_t &);
754 
755  /** process event */
756  virtual void process(const CASSEvent&, result_t&);
757 
758  /** load the settings */
759  virtual void loadSettings(size_t);
760 
761 protected:
762 
763  /** pp containing input histogram 1D*/
765 
766  /** pp containing input histogram 0D*/
768 
769  /** pp containing input histogram 1D it should be averaged _hist1D*/
771 
772  /** pp containing input histogram 0D it should be averaged _hist0D*/
774 
775  /** calculate covariance
776  *
777  * calculate covariance between wavetrace (1d) and intensity (0d).
778  *
779  * @param waveTrace input wavetrace
780  * @param waveTraceAve averaged wavetrace
781  * @param intensity 0d intensity value
782  * @param intensityAveOld averaged intensity value
783  * @param correction output histogram calculated covariance
784  * @param n number of present event
785  */
786  void calcCovariance(const result_t& waveTrace ,
787  const result_t& waveTraceAve ,
788  const float intensity ,
789  const float intensityAveOld,
791  float n);
792 
793 };
794 
795 }//end namespace cass
796 
797 
798 #endif // __PARTIAL_COVARIANCE_H__
double calcToftoMtC(double Timeoflight)
convert Time of Flight to mass to charge ratio
check if there is some light in the chamber based upon the pulse energy
size_t bintb1
tb1 converted to bin
double tb1
The lower limit for calculating baseline.
Event to store all LCLS Data.
Definition: cass_event.h:32
convert time of flight to charge to mass ratio
size_t bintb2
tb2 converted to bin
void ToftoMtC(const result_t &hist, result_t &MtC, double offset)
create m to q histogram from ToF histogram
std::vector< value_t > storage_t
the storage of this container
Definition: result.hpp:332
double tb2
The upper limit for calculating baseline.
double e0
retardation voltage
virtual void loadSettings(size_t)
load the settings of the pp
virtual void loadSettings(size_t)
load the settings of the pp
void calcCovariance(const result_t &waveTrace, const result_t &waveTraceAve, const float intensity, const float intensityAveOld, result_t &correction, float n)
calculate covariance
std::pair< float, float > _userTofRange
the user requested Tof-axis limits
file contains declaration of the CASSEvent
size_t binTofLow
lower limit converted to bin
shared_pointer _pHist
pp containing input histogram
shared_pointer _pHist
pp containing input histogram
double e0
retardation voltage
converts a Electron Time of Flight trace to Energy
double offset
the calculated level of baseline
size_t bintb1
tb1 converted to bin
size_t binTofLow
lower limit converted to bin
double calcEtoTof(double energy)
retrieve the time that corresponses to a given energy
shared_pointer _ave1D
pp containing input histogram 1D it should be averaged _hist1D
shared_pointer _ave0D
pp containing input histogram 0D it should be averaged _hist0D
double t0
corrects the time of flight
double calcEtoTof(double energy)
retrieve the time that corresponses to a given energy
std::pair< float, float > _userTofRange
the user requested Tof-axis limits
double MtC1
mass to charge ratio of t1
double alpha
Coefficient to convert to energy.
virtual void process(const CASSEvent &, result_t &)
process event
virtual void process(const CASSEvent &, result_t &)
process event
double MtC0
mass to charge ratio of t0
double tb2
The upper limit for calculating baseline.
std::pair< float, float > _userTofRange
the user requested Tof-axis limits
double ediff
difference from expected energy
shared_pointer _ave
pp containing input histogram
calculate intensity correction
virtual void loadSettings(size_t)
load the settings
size_t bintb2
tb2 converted to bin
size_t bintb2
tb2 converted to bin
size_t bintb1
tb1 converted to bin
virtual void loadSettings(size_t)
load the settings of the pp
virtual void process(const CASSEvent &, result_t &)
process event
size_t binTofUp
Upper limit converted to bin.
double t0
corrects the time of flight
void ToftoEnergy(const result_t &TofHisto, result_t &Energy, double offset)
make the histgram in energy scale.
double tb1
The lower limit for calculating baseline.
shared_pointer _pHist
pp containing input histogram
calc the pulse duration from the bld
size_t bintb2
tb2 converted to bin
shared_pointer _pHist
pp containing input histogram
double tb1
The lower limit for calculating baseline.
virtual void loadSettings(size_t)
load the settings
pp400(const name_t &)
constructor
base class for processors.
Definition: processor.h:39
size_t bint0
t0 converted to bin
double calcTofValue(const double tofPos, const size_t binlow, const double bin_size, const result_t &TofHisto)
retrieve the linear interpolation value
double calcEtoTof(double energy)
retrieve the time that corresponses to a given energy
size_t NbrBins
number of bins in converted histgram
double tb2
The upper limit for calculating baseline.
size_t bintb1
tb1 converted to bin
size_t binTofLow
lower limit converted to bin
double alpha
Coefficient to convert to energy.
double tb1
The lower limit for calculating baseline.
size_t NbrBins
number of bins in converted histgram
double t0
corrects the time of flight
size_t binTofUp
Upper limit converted to bin.
void ToftoEnergy(const result_t &TofHisto, result_t &Energy, double offset)
make the histogram in energy scale.
virtual void process(const CASSEvent &, result_t &)
calc the pulse duration from the bld
double calcEtoTof(double energy)
retrieve the time that corresponses to a given energy
virtual void loadSettings(size_t)
load the settings of the pp
pp412(const name_t &)
constructor
size_t NbrBins
number of bins in converted histgram
double ediff
corrects from photon energy value
shared_pointer _constHist
pp containing input OD histogram
Tof to Energy correct from 0D histogram.
double alpha
Coefficient to convert to energy.
auxiliary data[Processor]
pp408(const name_t &)
constructor
file contains processors baseclass declaration
double e0
retardation voltage
double t1
another time of flight of ion that we choosed
size_t binTofUp
Upper limit converted to bin.
set up the common mode correction
Tof to Energy linear interpolation.
double tb2
The upper limit for calculating baseline.
size_t NbrBins
number of bins in converted histgram
double tb2
The upper limit for calculating baseline.
shared_pointer _pHist
pp containing histogram to work on
void ToftoEnergy(const result_t &TofHisto, result_t &Energy, double offset)
make the histgram in energy scale.
virtual void process(const CASSEvent &, result_t &)
process event
size_t bint0
t0 converted to bin
Covariance map.
double e0
retardation voltage
double calcTofValue(const double tofPos, const size_t binlow, const double bin_size, const result_t &TofHisto)
retrieve the linear interpolation value
size_t bint0
t0 converted to bin
size_t binTofLow
lower limit converted to bin
void calcCovariance(const result_t &data, const result_t::storage_t &averageOld, const result_t &averageNew, result_t &variance, float n)
calculate the covariance map
size_t bint0
t0 converted to bin
an accumulating processor
Definition: processor.h:289
double t0
corrects the time of flight
offset
pp407(const name_t &)
constructor
virtual void process(const CASSEvent &, result_t &)
process event
double calcMtCtoTof(double MasstoCharge)
calculate the tof from the mass to charge ratio
std::pair< float, float > _userTofRange
the user requested Tof-axis limits
virtual void loadSettings(size_t)
load the settings of the pp
virtual void loadSettings(size_t)
load the settings from cass.ini
size_t bintb2
tb2 converted to bin
size_t binTofUp
Upper limit converted to bin.
pp405(const name_t &)
constructor
size_t bintb1
tb1 converted to bin
virtual void process(const CASSEvent &, result_t &)
process event
std::string name_t
define the name type
Definition: processor.h:46
size_t NbrBins
number of bins in converted histgram
std::pair< float, float > _userTofRange
the user requested Tof-axis limits
std::tr1::shared_ptr< Processor > shared_pointer
a shared pointer of this
Definition: processor.h:43
Tof to Energy linear interpolation and correct from 0d histogram.
void ToftoEnergy(const result_t &TofHisto, result_t &Energy, double offset)
make the histogram in energy scale.
shared_pointer _hist1D
pp containing input histogram 1D
shared_pointer _pHist
pp containing input histogram
virtual void process(const CASSEvent &, result_t &)
process event
pp406(const name_t &)
constructor
size_t binTofLow
lower limit converted to bin
shared_pointer _constHist
pp containing input OD histogram
pp404(const name_t &)
constructor
size_t binTofUp
Upper limit converted to bin.
pp410(const name_t &)
constructor
double alpha
Coefficient to convert to energy.
double t0
a time of flight of ion that we choosed
double tb1
The lower limit for calculating baseline.
shared_pointer _hist0D
pp containing input histogram 0D