FairRoot/PandaRoot
PndHypGeGammaAna.h
Go to the documentation of this file.
1 /******************************************************
2 
3 Analysis Task created by M.Steinen steinen@kph.uni-mainz.de
4 Analysis of Gamma Simulation with hypGe detectors
5 *******************************************************/
6 
7 
8 #ifndef PNDHYPGEGAMMAANA_H
9 #define PNDHYPGEGAMMAANA_H 1
10 
11 #include <FairTask.h>
12 #include <TH1D.h>
13 #include <TH2D.h>
14 #include <TClonesArray.h>
15 #include <TRandom.h>
16 #include <fstream>
17 #include <set>
18 //#include "PndHypGeGammaAnaStorage.h"
19 #include "PndHypGePoint.h"
20 #include "../../pnddata/HypData/PndHypPoint.h"
21 #include "PndMCTrack.h"
22 #include <TSpectrum.h>
23 #include <TF1.h>
24 #include "TGeoManager.h"
25 
26 
27 class PndHypGeGammaAna: public FairTask
28 {
29  public:
31  PndHypGeGammaAna(TString TxtFileName_Ext, Double_t GammaEnergy_Ext,Int_t nEvents = 0,Int_t nPeaks_Ext=1,Int_t PeakToLook_Ext = 1);
33 
34  virtual InitStatus Init();
35  virtual void Exec(Option_t* opt);
36  void Finish();
37  void SetParContainers();
38  void SetTarget(Bool_t TargetAvailable = 1);
39  void SetOmegaQuadrupolMode(Bool_t useOmegaQuadrupolMode_ext = 1);
40  void SetPeakWidtchStrechFactor(Double_t PeakWidtchStrechFactor_ext = 1);
41 
42  protected:
43 
46  Double_t SmearHit(Double_t Energy);
48  void FitSpectrum();
49  void FittingOutput();
50  void FindPeaks();
51  void GetPeakContent();
52  void ActivateComptonCalculations(Bool_t isActivated = 1);
53  void CalculateCompton();
54  void WriteHistogramsToFile();
55  void HistogramCosmetics(TH1D* histo, TString XTitle, Double_t XTitleSize, Double_t XTitleOffset, Double_t XLabelSize, TString YTitle, Double_t YTitleSize, Double_t YTitleOffset, Double_t YLabelSize);
56  void HistogramCosmetics2D(TH2D* histo, TString XTitle, Double_t XTitleSize, Double_t XTitleOffset, Double_t XLabelSize, TString YTitle, Double_t YTitleSize, Double_t YTitleOffset, Double_t YLabelSize);
57 
60  ofstream TxtFile;
61 
63 
68 
70 
71  TH1D* hGamEnergy;
74  TH1D* hThetaCheck;
76  TH1D* hAbsorption;
78 
79  TClonesArray* fMcTr;
80  TClonesArray* fMc;
81  TClonesArray* fGe;
82  TClonesArray* fGeAl;
83  TClonesArray* fSilicon;
84  TClonesArray* fTargetOther;
85 
91 
92  Long_t EvtCount;
97  TRandom* Rng;
98 
99  //PndHypGeGammaAnaStorage* fStorage;
100 
101  FairRootManager* ioman;
102  // Exec
103  std::set<int> SetOfCrystalHit;
104  TVector3 fStartVertex;
106 
107  //Analysis
108  Int_t nPeaks;
109  Int_t PeakToLook;
122 
123  TF1* GausBG;
124 
125  Float_t *xpeaks;
126  Float_t *ypeaks;
127 
129 
130 
131 
133 };
134 
135 #endif /* PNDHYPGEGAMMAANA_H */
PndMCTrack * fMCGam
TClonesArray * fMc
void ActivateComptonCalculations(Bool_t isActivated=1)
void HistogramCosmetics(TH1D *histo, TString XTitle, Double_t XTitleSize, Double_t XTitleOffset, Double_t XLabelSize, TString YTitle, Double_t YTitleSize, Double_t YTitleOffset, Double_t YLabelSize)
PndHypGePoint * fHitGe
Double_t CalculatePeakWidth(Double_t Energy)
bool InTargetAbsorbedGammaWouldHitGermanium()
void SetTarget(Bool_t TargetAvailable=1)
TClonesArray * fMcTr
Double_t PeakWidtchStrechFactor
Double_t invCompton(Double_t E, Double_t Eprime)
TClonesArray * fSilicon
void HistogramCosmetics2D(TH2D *histo, TString XTitle, Double_t XTitleSize, Double_t XTitleOffset, Double_t XLabelSize, TString YTitle, Double_t YTitleSize, Double_t YTitleOffset, Double_t YLabelSize)
PndMCTrack * fMCGamPrimary
Bool_t useOmegaQuadrupolMode
Double_t Compton(Double_t E, Double_t Th)
Double_t iHistoUpperLimit
void SetPeakWidtchStrechFactor(Double_t PeakWidtchStrechFactor_ext=1)
Double_t
void SetOmegaQuadrupolMode(Bool_t useOmegaQuadrupolMode_ext=1)
Int_t nEvents
Definition: hit_dirc.C:11
TClonesArray * fGeAl
std::set< int > SetOfCrystalHit
TClonesArray * fTargetOther
PndHypPoint * fHitSi
PndHypPoint * fHitTargetOther
TH1D * hGamEnergyTargetBackground
Double_t SmearHit(Double_t Energy)
TH2D * h2AbsorptionDistanceAngle
virtual void Exec(Option_t *opt)
virtual InitStatus Init()
ClassDef(PndHypGeGammaAna, 1)
TClonesArray * fGe
FairRootManager * ioman