source: trunk/MagicSoft/Mars/mfbase/MFEventSelector2.h@ 5670

Last change on this file since 5670 was 5667, checked in by domingo, 20 years ago
*** empty log message ***
File size: 2.4 KB
Line 
1#ifndef MARS_MFEventSelector2
2#define MARS_MFEventSelector2
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MFEventSelector2 //
7// //
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef MARS_MFilter
11#include "MFilter.h"
12#endif
13#ifndef ROOT_TArrayL
14#include <TArrayL.h>
15#endif
16#ifndef MARS_MDataChain
17#include "MDataChain.h"
18#endif
19
20class TH1;
21class TCanvas;
22
23class MH3;
24class MRead;
25
26class MFEventSelector2 : public MFilter
27{
28private:
29 static const TString gsDefName;
30 static const TString gsDefTitle;
31
32 MH3 *fHistOrig; // original distribution of the events
33 MH3 *fHistNom; // nominal distribution
34 MH3 *fHistRes; // resulting distribution
35 MDataChain fDataX; // data rule for the x-axis
36 MDataChain fDataY; // data rule for the y-axis
37 MDataChain fDataZ; // data rule for the z-axis
38 Long_t fNumMax; // Maximum number of selected events
39 TArrayL fIs; //! array storing the original distribution
40 TArrayL fNom; //! array storing the nominal distribution
41 TCanvas *fCanvas; //! canvas for online display
42
43 TString fFilterName; // name of the MFilter object to be used
44 // when determining the original distribution
45
46 Bool_t fResult;
47 Bool_t fHistIsProbability;
48 Bool_t fUseOrigDist; // flag indicating that in the selection the
49 // original distribution is not changed
50
51 Int_t fCounter[3];
52
53 TH1 &InitHistogram(MH3* &hist);
54 Bool_t ReadDistribution(MRead &read, MFilter *filter);
55 void PrepareHistograms();
56 Bool_t PreProcessData(MParList *parlist);
57 Bool_t Select(Int_t bin);
58 Bool_t SelectProb(Int_t bin) const;
59
60 Int_t PreProcess(MParList *parlist);
61 Int_t Process();
62 Int_t PostProcess();
63
64public:
65 MFEventSelector2(MH3 &hist, const char *name=NULL, const char *title=NULL);
66 ~MFEventSelector2();
67
68 MH3 *GetHistOrig() { return fHistOrig; }
69
70 void SetNumMax(Long_t max=-1) { fNumMax = max; }
71 void SetHistIsProbability(Bool_t b=kTRUE) { fHistIsProbability=b; }
72 Bool_t IsExpressionTrue() const { return fResult; }
73
74 ClassDef(MFEventSelector2, 0) // FIXME!
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.