6 #ifndef GW_GAMMAFILTER_H
21 fComptonShape =
new TH1F(
"GammaFilter_ComptonShape",
"ComptonShape",1000,0,1);
22 for (Int_t i = 0; i < 1000; i++ ) {
27 SetNameTitle(
"GammaFilter",
"Standard Experimental Filter for Raw Gamma-rays");
36 lxmin = xmin; lxmax = xmax;
37 if ( lxmin > lxmax ) { lxmin = xmax; lxmax = xmin; }
39 Int_t bin = Int_t ( lxmax - lxmin );
41 fEfficiency =
new TH1F(
"GammaFilter_Efficiency",
"Efficiency",bin,lxmin,lxmax);
42 fCompton =
new TH1F(
"GammaFilter_Compton",
"Compton",bin,lxmin,lxmax);
43 fDoppler =
new TH1F(
"GammaFilter_Doppler",
"Doppler",bin,lxmin,lxmax);
45 for (Int_t i = 1; i < bin ; i++ ) {
47 fCompton->SetBinContent(i,TMath::Abs(PT));
48 fDoppler->SetBinContent(i,TMath::Abs(dop));
53 SetNameTitle(
"GammaFilter",
"Standard Experimental Filter for Raw Gamma-rays");
73 TFile *rfile = TFile::Open(rootfile);
75 h = (TH1F *)rfile->Get(
"GammaFilter_Efficiency");
81 h = (TH1F *)rfile->Get(
"GammaFilter_Compton");
85 h = (TH1F *)rfile->Get(
"GammaFilter_Doppler");
107 Bool_t ok; Float_t etmp;
123 nb = 0; TIter next(&li_gamma);
124 while( (obj = next()) != NULL ) {
131 if (
Compton(gam,e) ) { nb++; b << e;
continue; }
145 nb = 0; TIter next(&li_gamma);
146 while( (obj = next()) != NULL ) {
153 if (
Compton(gam,e) ) { energies[nb++] = e;
continue; }
virtual Int_t ApplyE(const TSeqCollection &, TBuffer &)
Apply this filter to the list of gamma-rays.
Bool_t InitFilter(const char *)
to modifiy the efficency curve.
TRandom * Current() const
to get the current TRandomom object
virtual Data_T Get() const
get the value, can be overloaded
bool IsRejected(GammaLink *)
True if this gamma ray is not detected.
This class is a base class for any experimental filter.
Standard filter for gamma-rays (EUROBALL-like appproach)
virtual Measure< Float_t > & GetEnergy()
to get/modify the gamma-ray energy and its error
Float_t Doppler(GammaLink *)
return a random number assuming a gaussian at the gamma-rays position with a width given by fDoppler ...
Bool_t Compton(GammaLink *, Float_t &)
true if this gamma-ray has not given all its energy.
Bool_t IsEffective()
check out if it has been correctly initiated
A GammaLink binds two nuclear levels.