FairRoot/PandaRoot
Functions | Variables
reco_analys2.C File Reference

Go to the source code of this file.

Functions

gROOT LoadMacro ("$VMCWORKDIR/gconfig/rootlogon.C")
 
gROOT LoadMacro ("$VMCWORKDIR/gconfig/basiclibs.C")
 
 rootlogon ()
 
 basiclibs ()
 
t SetBranchAddress ("EmcCluster",&cluster_array)
 
 for (Int_t j=0;j< t->GetEntriesFast();j++)
 
h1 SetTitle ("#pi^{0} Invariant mass reconstruction")
 
h1 SetStats (kTRUE)
 
h1 GetXaxis () -> SetTitle("Energy, GeV")
 
h1 Draw ()
 
f1 SetParameters (par1)
 
f1 SetLineColor (2)
 
h1 Fit ("f1")
 

Variables

TFile * f = new TFile("full_emc.root")
 
TTree * t =(TTree *) f->Get("pndsim")
 
TClonesArray * cluster_array =new TClonesArray("PndEmcCluster")
 
double cluster_energy
 
TH1F * h1 = new TH1F("h1","Invariant mass",100,0.05,0.18)
 
TVector3 v1
 
TVector3 v2
 
TCanvas * c1 = new TCanvas("c1", "", 100, 100, 800, 800)
 
TF1 * f1 = new TF1("f1","gaus(0)",50.,150.)
 
Double_t par1 [3] ={60,0.130,0.01}
 
double mu1 =f1->GetParameter(1)
 
double sigma1 =f1->GetParameter(2)
 

Function Documentation

basiclibs ( )
h1 Draw ( )

Definition at line 64 of file NHitsPerEvent.C.

64  {
65 
66  std::cout << "mvdHitArray: " << mvdHitArray->GetEntries() << " projectedHitArray " << mvdProjectedArray->GetEntries() << std::endl;
67 
68 // gHitPoints->Clear();
71  //if (gHitPoints->GetN() != x.size()) gHitPoints->Expand(x.size());
72 
73  std::cout << "NHits: " << gHitPoints->GetN() << std::endl;
74  gHitPoints->Draw("apl");
75  gProjections->Draw("pl");
76 }
void ExtractData(TClonesArray *array, TGraph *g)
Definition: NHitsPerEvent.C:78
TGraph * gHitPoints
Definition: NHitsPerEvent.C:15
TClonesArray * mvdHitArray
Definition: NHitsPerEvent.C:12
TClonesArray * mvdProjectedArray
Definition: NHitsPerEvent.C:13
TGraph * gProjections
Definition: NHitsPerEvent.C:16
h1 Fit ( "f1"  )
for ( Int_t  j = 0; j< t->GetEntriesFast(); j++)

Definition at line 22 of file reco_analys2.C.

References alpha, cos(), PndEmcCluster::energy(), i, sqrt(), threshold, and PndEmcCluster::where().

23  {
24  t->GetEntry(j);
25  for (Int_t i=0; i<cluster_array->GetEntriesFast(); i++)
26  {
27  PndEmcCluster *cluster1=(PndEmcCluster*)cluster_array->At(i);
28  if (cluster1->energy()<threshold) continue;
29  v1=cluster1->where();
30 
31  for (Int_t k=i; k<cluster_array->GetEntriesFast(); k++)
32  {
33  PndEmcCluster *cluster2=(PndEmcCluster*)cluster_array->At(k);
34  if (cluster2->energy()<threshold) continue;
35  v2=cluster2->where();
36  double alpha=v1.Angle(v2);
37  double invMass=sqrt(2*cluster1->energy()*cluster2->energy()*(1-cos(alpha)));
38  h1->Fill(invMass);
39  }
40 
41  }
42  }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
TVector3 where() const
Int_t i
Definition: run_full.C:25
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
TH1F * h1
Definition: reco_analys2.C:18
TVector3 v2
Definition: reco_analys2.C:20
TVector3 v1
Definition: reco_analys2.C:20
a cluster (group of neighboring crystals) of hit emc crystals
Definition: PndEmcCluster.h:29
double threshold
TTree * t
Definition: reco_analys2.C:12
virtual Double_t energy() const
double alpha
Definition: f_Init.h:9
TClonesArray * cluster_array
Definition: reco_analys2.C:14
h1 GetXaxis ( ) -> SetTitle("Energy, GeV")

Definition at line 653 of file anal_hit_digi_cluster_fwendcap.C.

653 {Reconstructed}-#theta_{MC} (#circ)");
gROOT LoadMacro ( "$VMCWORKDIR/gconfig/rootlogon.C )
gROOT LoadMacro ( "$VMCWORKDIR/gconfig/basiclibs.C )
rootlogon ( )

Definition at line 1 of file outdated/mpiTools/macros/emc/rootlogon.C.

2 {
3  gSystem->AddIncludePath("-I$VMCWORKDIR/emc");
4  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcDigi");
5  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcMC");
6  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcTools");
7  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcReco");
8  gSystem->AddIncludePath("-I$VMCWORKDIR/emc/EmcData");
9  gSystem->AddIncludePath("-I$VMCWORKDIR/pnddata");
10  gSystem->AddIncludePath("-I$VMCWORKDIR/base");
11  gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C");
12  basiclibs();
13 
14  gSystem->Load("libDpmEvtGen.so");
15  gSystem->Load("libGeoBase");
16  gSystem->Load("libParBase");
17  gSystem->Load("libBase");
18  gSystem->Load("libTrkBase");
19  gSystem->Load("libPndData");
20  gSystem->Load("libField");
21  gSystem->Load("libPassive");
22  gSystem->Load("libGen");
23  gSystem->Load("libPGen");
24  gSystem->Load("libEmc");
25 
26  delete gRandom;
27  gRandom=new TRandom3(0);
28 }
basiclibs()
t SetBranchAddress ( "EmcCluster"  ,
cluster_array 
)
f1 SetLineColor ( )
f1 SetParameters ( par1  )
h1 SetStats ( kTRUE  )
h1 SetTitle ( "#pi^{0} Invariant mass reconstruction"  )

Variable Documentation

TCanvas* c1 = new TCanvas("c1", "", 100, 100, 800, 800)

Definition at line 44 of file reco_analys2.C.

TClonesArray* cluster_array =new TClonesArray("PndEmcCluster")

Definition at line 14 of file reco_analys2.C.

double cluster_energy

Definition at line 17 of file reco_analys2.C.

TFile* f = new TFile("full_emc.root")

Definition at line 10 of file reco_analys2.C.

TF1 * f1 = new TF1("f1","gaus(0)",50.,150.)
TH1F* h1 = new TH1F("h1","Invariant mass",100,0.05,0.18)

Definition at line 18 of file reco_analys2.C.

double mu1 =f1->GetParameter(1)

Definition at line 56 of file reco_analys2.C.

Referenced by DecayTreeFitter::InternalParticle::initPar1().

Double_t par1[3] ={60,0.130,0.01}
double sigma1 =f1->GetParameter(2)

Definition at line 57 of file reco_analys2.C.

Referenced by QAmacro_mvd_ana(), and QAmacro_stt_4().

TTree* t =(TTree *) f->Get("pndsim")

Definition at line 12 of file reco_analys2.C.

TVector3 v1

Definition at line 20 of file reco_analys2.C.

TVector3 v2

Definition at line 20 of file reco_analys2.C.