#include <iostream>
#include <string>
#include <typeinfo>
#include <vector>
#include <list>
#include "Riostream.h"
#include "TRint.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TRandom2.h"
#include "TH2.h"
#include "TH1.h"
#include "TF1.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TMultiGraph.h"
#include "TCanvas.h"
#include "TPad.h"
#include "TProfile.h"
#include "TStopwatch.h"
#include "TFile.h"
#include "TTree.h"
#include "TBranch.h"
#include "TMath.h"
#include "TLegend.h"
#include "TLine.h"
#include "TColor.h"
#include "TText.h"
#include "TKey.h"
#include "TLatex.h"
#include "TPaveText.h"
#include "TPrincipal.h"
#include "TMatrix.h"
#include "TRocEvent.h"
#include "roc/Message.h"
#include "TSpadicEvent.h"
#include "TEpicsEvent.h"
#include "TFiberHodEvent.h"
#include "TMbsCrateEvent.h"
#include "TBeamMonitorEvent.h"
#include "TCernOct12UnpackEvent.h"
#include "TCernOct12DetectorEvent.h"
#include "PR_tools.cxx"
Go to the source code of this file.
Defines | |
#define | NUM_SPADIC_CHA 8 |
#define | SPADIC_TRACE_SIZE 45 |
#define | SPADIC_ADC_MAX 255 |
#define | noBaselineTB 5 |
Functions | |
Int_t | momentum (0) |
Int_t | AnodeV (0) |
Int_t | DriftV (0) |
void | SetSusid (Int_t sid=0) |
Double_t | MPV_kev (0.0) |
Double_t | MPV_adc (0.0) |
Double_t | sigma_kev (0.0) |
Double_t | sigma_adc (0.0) |
Double_t | ChiSqr_kev (0.0) |
Double_t | ChiSqr_adc (0.0) |
void | Statusbar (Int_t i, Int_t n) |
Double_t | scaling2keV (Double_t ADCvalue) |
void | CalcPionEfficiency (TH1D *hElectronSpectra, TH1D *hPionSpectra, TGraphErrors *hEfficiency, TGraphErrors *fitEfficiency, const Int_t nChambers, Bool_t debug=false) |
void | CalcPionEfficiency (TH1D *hElectronSpectra, TH1D *hPionSpectra, TProfile *hEfficiency, const Int_t nChambers, Bool_t debug) |
void | GetPidCuts (TString runId) |
void | getPID (Float_t ch1, Float_t ch2, Float_t pb) |
Int_t | GetPadMax (TH1D *inPulse[NUM_SPADIC_CHA]) |
Double_t | Get3PadIntegral (TH1D *inPulse[NUM_SPADIC_CHA]) |
Double_t | Get3PadPosAmplitude (TH1D *inPulse[NUM_SPADIC_CHA]) |
Double_t | Get3PadPosIntegral (TH1D *inPulse[NUM_SPADIC_CHA]) |
Double_t | Get3PadPosIntegralCrossTalk (TH1D *inPulse1[NUM_SPADIC_CHA], TH1D *inPulse2[NUM_SPADIC_CHA], Int_t *deltaChMax) |
Double_t | calcK3at0hs (Double_t ra=0.02, Double_t s=2.5) |
Double_t | calcK3 (Float_t h=4.0) |
void | PrfAna (TH1D *inPulse[NUM_SPADIC_CHA], TH2D *clusterwCharge, Int_t maxCh=-1, Int_t clusterWidth=0) |
void | CalcPrf (TH1D *inPulse[NUM_SPADIC_CHA], TH2D *prf, TProfile *prfProfile, Double_t padWidth, Int_t maxCh=-1) |
void | FillAverageSignal (TH1D *inPulse[NUM_SPADIC_CHA], TProfile *averagePulse, TH2I *averagePulse2D) |
Double_t | GetMaxAplitude (TH1D *inPulse[NUM_SPADIC_CHA], Int_t maxCh=-1) |
Bool_t | HitTimeWindow (TH1D *inPulse[NUM_SPADIC_CHA], Int_t maxCh=-1) |
Bool_t | BorderPadMax (TH1D *inPulse[NUM_SPADIC_CHA], Int_t maxCh=-1) |
Bool_t | minimumIntegralThreshold (TH1D *inPulse[NUM_SPADIC_CHA]) |
Bool_t | minimumAmplitudeThreshold (TH1D *inPulse[NUM_SPADIC_CHA], Int_t maxCh=-1) |
void | BaselineCompensation (TH1D *inPulse[NUM_SPADIC_CHA], TH1D *outPulse[NUM_SPADIC_CHA], TH2I *baselineDistribution=NULL) |
Int_t | GetClusterSize () |
Int_t | CancelNoise_Cova (TH1D *inPulse[NUM_SPADIC_CHA], TH1D *outPulse[NUM_SPADIC_CHA], TH1I *covaMatixValue=NULL, TH2I *covaMatixValueMaxAmplitude=NULL, TH2I *covaMatixValueHitTime=NULL, TH2I *maxAmplitudeHitTime=NULL, TH1I *noiseDistribution=NULL, TH1I *clusterSize=NULL, TH1I *signalChDistance=NULL, TH2I *averageNoise_2D=NULL, TH2I *averageSignal_2D=NULL, TH2I *covaMatixValueClusterSize=NULL, Bool_t debug=false) |
void | CalcDeltaSim (TH1D *delta, TH1D *sim) |
Double_t | Calibration (TString file, Int_t suid) |
void | FillUnCalibratedPionSpectrum (TString filename, TString file, Int_t usedSuId, Bool_t amplitude, Bool_t debug) |
void | spadic_noise_Analysis (TString filename="data2012/TTrees/Be_run2310004.root", TString radiator="D", const Int_t suid=1, Bool_t debug=false, Bool_t simple=false, Bool_t plotFromFile=true) |
Variables | |
Double_t | fHistoScale = 25 |
Double_t | dEdx_min = 0. |
Double_t | dEdx_max = 100. |
Int_t | Pi_Ch1_Min |
Int_t | Pi_Ch1_Max |
Int_t | Pi_Ch2_Min |
Int_t | Pi_Ch2_Max |
Int_t | Pi_Pb_Min |
Int_t | Pi_Pb_Max |
Int_t | El_Ch1_Min |
Int_t | El_Ch1_Max |
Int_t | El_Ch2_Min |
Int_t | El_Ch2_Max |
Int_t | El_Pb_Min |
Int_t | El_Pb_Max |
Bool_t | isElectron |
Bool_t | isPion |
Bool_t | isMyon |
Bool_t | isOverFlowEvent |
Bool_t | isUnderFlowEvent |
Bool_t | isPulser |
TPrincipal * | principal = new TPrincipal(NUM_SPADIC_CHA,"ND") |
Int_t | susid = 0 |
Int_t | pidcuts [18] = {0} |
Double_t | calibrationParameter [4] = {0.0} |
#define noBaselineTB 5 |
Definition at line 61 of file spadic_noise_Analysis.cxx.
#define NUM_SPADIC_CHA 8 |
Definition at line 58 of file spadic_noise_Analysis.cxx.
Referenced by FillUnCalibratedPionSpectrum(), and spadic_noise_Analysis().
#define SPADIC_ADC_MAX 255 |
Definition at line 60 of file spadic_noise_Analysis.cxx.
Referenced by FillUnCalibratedPionSpectrum(), scaling2keV(), and spadic_noise_Analysis().
#define SPADIC_TRACE_SIZE 45 |
Definition at line 59 of file spadic_noise_Analysis.cxx.
Referenced by CalcPrf(), FillAverageSignal(), FillUnCalibratedPionSpectrum(), Get3PadPosIntegral(), Get3PadPosIntegralCrossTalk(), PrfAna(), scaling2keV(), and spadic_noise_Analysis().
Int_t AnodeV | ( | 0 | ) |
Referenced by Calibration(), and spadic_noise_Analysis().
void BaselineCompensation | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
TH1D * | outPulse[NUM_SPADIC_CHA], | |||
TH2I * | baselineDistribution = NULL | |||
) |
Definition at line 1077 of file spadic_noise_Analysis.cxx.
Bool_t BorderPadMax | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
Int_t | maxCh = -1 | |||
) |
Definition at line 1030 of file spadic_noise_Analysis.cxx.
References GetPadMax().
void CalcDeltaSim | ( | TH1D * | delta, | |
TH1D * | sim | |||
) |
Definition at line 1329 of file spadic_noise_Analysis.cxx.
Double_t calcK3 | ( | Float_t | h = 4.0 |
) |
Definition at line 889 of file spadic_noise_Analysis.cxx.
References calcK3at0hs().
Referenced by PrfAna(), spadic_noise_Analysis(), and spadic_pr_Analysis().
Double_t calcK3at0hs | ( | Double_t | ra = 0.02 , |
|
Double_t | s = 2.5 | |||
) |
Definition at line 882 of file spadic_noise_Analysis.cxx.
Referenced by calcK3().
void CalcPionEfficiency | ( | TH1D * | hElectronSpectra, | |
TH1D * | hPionSpectra, | |||
TGraphErrors * | hEfficiency, | |||
TGraphErrors * | fitEfficiency, | |||
const Int_t | nChambers, | |||
Bool_t | debug = false | |||
) |
Definition at line 142 of file spadic_noise_Analysis.cxx.
References debug, and Statusbar().
void CalcPionEfficiency | ( | TH1D * | hElectronSpectra, | |
TH1D * | hPionSpectra, | |||
TProfile * | hEfficiency, | |||
const Int_t | nChambers, | |||
Bool_t | debug | |||
) |
Definition at line 331 of file spadic_noise_Analysis.cxx.
References Statusbar().
void CalcPrf | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
TH2D * | prf, | |||
TProfile * | prfProfile, | |||
Double_t | padWidth, | |||
Int_t | maxCh = -1 | |||
) |
Definition at line 932 of file spadic_noise_Analysis.cxx.
References calcSimpleDisplacement(), GetPadMax(), and SPADIC_TRACE_SIZE.
Double_t Calibration | ( | TString | file, | |
Int_t | suid | |||
) |
Definition at line 1352 of file spadic_noise_Analysis.cxx.
References AnodeV(), calibrationParameter, ChiSqr_adc(), ChiSqr_kev(), momentum(), MPV_adc(), MPV_kev(), sigma_adc(), sigma_kev(), and susid.
Int_t CancelNoise_Cova | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
TH1D * | outPulse[NUM_SPADIC_CHA], | |||
TH1I * | covaMatixValue = NULL , |
|||
TH2I * | covaMatixValueMaxAmplitude = NULL , |
|||
TH2I * | covaMatixValueHitTime = NULL , |
|||
TH2I * | maxAmplitudeHitTime = NULL , |
|||
TH1I * | noiseDistribution = NULL , |
|||
TH1I * | clusterSize = NULL , |
|||
TH1I * | signalChDistance = NULL , |
|||
TH2I * | averageNoise_2D = NULL , |
|||
TH2I * | averageSignal_2D = NULL , |
|||
TH2I * | covaMatixValueClusterSize = NULL , |
|||
Bool_t | debug = false | |||
) |
Definition at line 1119 of file spadic_noise_Analysis.cxx.
References clusterSize, counter, cova, debug, GetPadMax(), principal, signalChDistance, and susid.
Double_t ChiSqr_adc | ( | 0. | 0 | ) |
Referenced by Calibration(), and spadic_noise_Analysis().
Double_t ChiSqr_kev | ( | 0. | 0 | ) |
Referenced by Calibration().
Int_t DriftV | ( | 0 | ) |
Referenced by spadic_noise_Analysis().
void FillAverageSignal | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
TProfile * | averagePulse, | |||
TH2I * | averagePulse2D | |||
) |
Definition at line 970 of file spadic_noise_Analysis.cxx.
References GetPadMax(), and SPADIC_TRACE_SIZE.
void FillUnCalibratedPionSpectrum | ( | TString | filename, | |
TString | file, | |||
Int_t | usedSuId, | |||
Bool_t | amplitude, | |||
Bool_t | debug | |||
) |
3.674*830.609);//-1000,15000);//(100keV)
3.674*830.609);//-1000,15000);//(100keV)
Definition at line 1642 of file spadic_noise_Analysis.cxx.
References BaselineCompensation(), BorderPadMax(), CancelNoise_Cova(), clusterSize, TMbsCrateEvent::fData1182, fHistoScale, TMbsCrateEvent::fIsPulser, TSpadicData::fSpadicPulse, Get3PadPosAmplitude(), Get3PadPosIntegral(), getPID(), GetPidCuts(), TCBMBeamtimeEvent::GetSubEvent(), HitTimeWindow(), isElectron, isOverFlowEvent, isPion, isPulser, isUnderFlowEvent, minimumAmplitudeThreshold(), minimumIntegralThreshold(), NUM_SPADIC_CHA, signalChDistance, SPADIC_ADC_MAX, SPADIC_TRACE_SIZE, and Statusbar().
Double_t Get3PadIntegral | ( | TH1D * | inPulse[NUM_SPADIC_CHA] | ) |
Definition at line 768 of file spadic_noise_Analysis.cxx.
References GetPadMax().
Double_t Get3PadPosAmplitude | ( | TH1D * | inPulse[NUM_SPADIC_CHA] | ) |
Definition at line 778 of file spadic_noise_Analysis.cxx.
References GetPadMax().
Double_t Get3PadPosIntegral | ( | TH1D * | inPulse[NUM_SPADIC_CHA] | ) |
Definition at line 791 of file spadic_noise_Analysis.cxx.
References SPADIC_TRACE_SIZE.
Double_t Get3PadPosIntegralCrossTalk | ( | TH1D * | inPulse1[NUM_SPADIC_CHA], | |
TH1D * | inPulse2[NUM_SPADIC_CHA], | |||
Int_t * | deltaChMax | |||
) |
Definition at line 818 of file spadic_noise_Analysis.cxx.
References SPADIC_TRACE_SIZE.
Int_t GetClusterSize | ( | ) |
Definition at line 1115 of file spadic_noise_Analysis.cxx.
Double_t GetMaxAplitude | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
Int_t | maxCh = -1 | |||
) |
Definition at line 1016 of file spadic_noise_Analysis.cxx.
References GetPadMax().
Referenced by spadic_noise_Analysis().
Int_t GetPadMax | ( | TH1D * | inPulse[NUM_SPADIC_CHA] | ) |
Definition at line 737 of file spadic_noise_Analysis.cxx.
void getPID | ( | Float_t | ch1, | |
Float_t | ch2, | |||
Float_t | pb | |||
) |
Definition at line 703 of file spadic_noise_Analysis.cxx.
References isElectron, isMyon, isPion, and pidcuts.
void GetPidCuts | ( | TString | runId | ) |
Definition at line 544 of file spadic_noise_Analysis.cxx.
References pidcuts.
Bool_t HitTimeWindow | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
Int_t | maxCh = -1 | |||
) |
Definition at line 1022 of file spadic_noise_Analysis.cxx.
References GetPadMax().
Bool_t minimumAmplitudeThreshold | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
Int_t | maxCh = -1 | |||
) |
Definition at line 1045 of file spadic_noise_Analysis.cxx.
References susid.
Bool_t minimumIntegralThreshold | ( | TH1D * | inPulse[NUM_SPADIC_CHA] | ) |
Definition at line 1036 of file spadic_noise_Analysis.cxx.
References Get3PadPosIntegral().
Int_t momentum | ( | 0 | ) |
Referenced by Calibration(), plotResults(), and spadic_noise_Analysis().
Double_t MPV_adc | ( | 0. | 0 | ) |
Referenced by Calibration(), scaling2keV(), and spadic_noise_Analysis().
Double_t MPV_kev | ( | 0. | 0 | ) |
Referenced by Calibration(), scaling2keV(), and spadic_noise_Analysis().
void PrfAna | ( | TH1D * | inPulse[NUM_SPADIC_CHA], | |
TH2D * | clusterwCharge, | |||
Int_t | maxCh = -1 , |
|||
Int_t | clusterWidth = 0 | |||
) |
Definition at line 896 of file spadic_noise_Analysis.cxx.
References calcK3(), GetPadMax(), and SPADIC_TRACE_SIZE.
Referenced by spadic_noise_Analysis().
Double_t scaling2keV | ( | Double_t | ADCvalue | ) |
Definition at line 116 of file spadic_noise_Analysis.cxx.
References fHistoScale, MPV_adc(), MPV_kev(), SPADIC_ADC_MAX, and SPADIC_TRACE_SIZE.
Referenced by spadic_noise_Analysis().
void SetSusid | ( | Int_t | sid = 0 |
) |
Definition at line 88 of file spadic_noise_Analysis.cxx.
References susid.
Double_t sigma_adc | ( | 0. | 0 | ) |
Referenced by Calibration(), and spadic_noise_Analysis().
Double_t sigma_kev | ( | 0. | 0 | ) |
Referenced by Calibration(), and spadic_noise_Analysis().
void spadic_noise_Analysis | ( | TString | filename = "data2012/TTrees/Be_run2310004.root" , |
|
TString | radiator = "D" , |
|||
const Int_t | suid = 1 , |
|||
Bool_t | debug = false , |
|||
Bool_t | simple = false , |
|||
Bool_t | plotFromFile = true | |||
) |
3.674*830.609);//15000);
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
scaling2keV
Definition at line 1834 of file spadic_noise_Analysis.cxx.
References AnodeV(), BaselineCompensation(), BorderPadMax(), CalcDeltaSim(), calcK3(), CalcPionEfficiency(), CalcPrf(), Calibration(), CancelNoise_Cova(), ChiSqr_adc(), clusterSize, debug, DriftV(), TMbsCrateEvent::fData1182, fHistoScale, FillAverageSignal(), FillUnCalibratedPionSpectrum(), TMbsCrateEvent::fIsPulser, TSpadicData::fSpadicCompensated, TSpadicData::fSpadicPulse, Get3PadPosAmplitude(), Get3PadPosIntegral(), Get3PadPosIntegralCrossTalk(), GetMaxAplitude(), getPID(), GetPidCuts(), TCBMBeamtimeEvent::GetSubEvent(), HitTimeWindow(), isElectron, isOverFlowEvent, isPion, isUnderFlowEvent, minimumAmplitudeThreshold(), minimumIntegralThreshold(), momentum(), MPV_adc(), MPV_kev(), NUM_SPADIC_CHA, PrfAna(), scaling2keV(), sigma_adc(), sigma_kev(), signalChDistance, SPADIC_ADC_MAX, SPADIC_TRACE_SIZE, Statusbar(), and susid.
void Statusbar | ( | Int_t | i, | |
Int_t | n | |||
) |
Definition at line 94 of file spadic_noise_Analysis.cxx.
Double_t calibrationParameter[4] = {0.0} |
Definition at line 86 of file spadic_noise_Analysis.cxx.
Referenced by Calibration().
Double_t dEdx_max = 100. |
Definition at line 66 of file spadic_noise_Analysis.cxx.
Double_t dEdx_min = 0. |
Definition at line 65 of file spadic_noise_Analysis.cxx.
Int_t El_Ch1_Max |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t El_Ch1_Min |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t El_Ch2_Max |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t El_Ch2_Min |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t El_Pb_Max |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t El_Pb_Min |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Double_t fHistoScale = 25 |
Definition at line 62 of file spadic_noise_Analysis.cxx.
Referenced by FillUnCalibratedPionSpectrum(), scaling2keV(), and spadic_noise_Analysis().
Bool_t isElectron |
Definition at line 68 of file spadic_noise_Analysis.cxx.
Bool_t isMyon |
Definition at line 68 of file spadic_noise_Analysis.cxx.
Bool_t isOverFlowEvent |
Definition at line 68 of file spadic_noise_Analysis.cxx.
Bool_t isPion |
Definition at line 68 of file spadic_noise_Analysis.cxx.
Bool_t isPulser |
Definition at line 68 of file spadic_noise_Analysis.cxx.
Referenced by FillUnCalibratedPionSpectrum(), and spadic_pr_Analysis().
Bool_t isUnderFlowEvent |
Definition at line 68 of file spadic_noise_Analysis.cxx.
Int_t Pi_Ch1_Max |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t Pi_Ch1_Min |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t Pi_Ch2_Max |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t Pi_Ch2_Min |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t Pi_Pb_Max |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t Pi_Pb_Min |
Definition at line 67 of file spadic_noise_Analysis.cxx.
Int_t pidcuts[18] = {0} |
Definition at line 85 of file spadic_noise_Analysis.cxx.
TPrincipal* principal = new TPrincipal(NUM_SPADIC_CHA,"ND") |
Definition at line 69 of file spadic_noise_Analysis.cxx.
Int_t susid = 0 |
Definition at line 84 of file spadic_noise_Analysis.cxx.
Referenced by Calibration(), CancelNoise_Cova(), minimumAmplitudeThreshold(), SetSusid(), spadic_noise_Analysis(), and spadic_pr_Analysis().