Go to the source code of this file.
Definition at line 3 of file fit_resolution.C.
References c1, cluster_array, cluster_energy, Double_t, PndEmcCluster::energy(), f, f1, h1, i, novosibirsk_fcn(), PndEmcCluster::NumberOfDigis(), and t.
8 f1->SetParameters(1000,energy0,0.01*energy0,0.001);
9 f1->SetParNames(
"constant",
"mu",
"sigma",
"tau");
12 TFile*
f =
new TFile(
"cluster_emc.root");
13 TTree *
t=(TTree *) f->Get(
"pndsim") ;
14 TClonesArray*
cluster_array=
new TClonesArray(
"PndEmcCluster");
15 t->SetBranchAddress(
"EmcCluster",&cluster_array);
18 TH1F *
h1=
new TH1F(
"h1",
"Cluster energy",200,0.7*energy0,1.1*energy0);
21 for (Int_t j=0; j< t->GetEntriesFast(); j++)
24 for (Int_t
i=0;
i<cluster_array->GetEntriesFast();
i++)
27 cluster_energy=cluster->
energy();
29 h1->Fill(cluster_energy);
33 TCanvas*
c1 =
new TCanvas(
"c1",
"Cluster Energy", 100, 100, 800, 800);
34 h1->SetTitle(
"Cluster energy");
35 h1->GetXaxis()->SetTitle(
"Energy, GeV");
TClonesArray * cluster_array
Double_t novosibirsk_fcn(Double_t *xp, Double_t *par)
a cluster (group of neighboring crystals) of hit emc crystals
Int_t NumberOfDigis() const
virtual Double_t energy() const
Definition at line 42 of file fit_resolution.C.
References a, CAMath::Abs(), Double_t, CAMath::Log(), log(), sigma, and x.
Referenced by fit_resolution().
52 return TMath::Exp( -0.5 * TMath::Power( ( (x - mu) / sigma), 2 ));
55 Double_t arg = 1.0 - ( x - mu ) * tau / sigma;
63 static const Double_t xi = 2.3548200450309494;
65 Double_t width_zero = ( 2.0 / xi ) * TMath::ASinH( tau * xi * 0.5 );
66 Double_t width_zero2 = width_zero * width_zero;
67 Double_t exponent = ( -0.5 / (width_zero2) * log * log ) - ( width_zero2 * 0.5 );
69 return a*TMath::Exp(exponent);
friend F32vec4 log(const F32vec4 &a)