star-travex
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DecayVertexHists.cxx
Go to the documentation of this file.
1 #include "TH1I.h"
2 
4 
5 #include "StMuDSTMaker/COMMON/StMuPrimaryVertex.h"
6 #include "StMuDSTMaker/COMMON/StMuMcVertex.h"
7 
8 
9 DecayVertexHists::DecayVertexHists(const std::string name, TDirectory* motherDir, const std::string option) :
10  tvx::HistContainer(name, motherDir, option)
11 {
12  Add( new TH1I("hInvMass", "; Invariant Mass, GeV; Counts; ", 200, 0.4, 1.2) );
13  Add( new TH1I("hDecayLength", "; Decay Length, cm; Counts; ", 50, 0, 50) );
14  Add( new TH1I("hDLSignificance", "; Decay Length Significance, cm; Counts; ", 50, 0, 50) );
15 }
16 
17 
18 void DecayVertexHists::FillHists(const StMuPrimaryVertex &vertex, const TDecayVertex& decayVtx)
19 {
20  h("hInvMass")->Fill( decayVtx.im_p );
21  h("hDecayLength")->Fill( decayVtx.dl_p );
22  double expected_decay_vertex_err2 = 0.15*0.15;
23  h("hDLSignificance")->Fill( decayVtx.dl_p / sqrt(vertex.posError().mag()*vertex.posError().mag() + expected_decay_vertex_err2) );
24 }
DecayVertexHists(const std::string name, TDirectory *motherDir=nullptr, const std::string option="")
void FillHists(const StMuPrimaryVertex &vertex, const TDecayVertex &decayVtx)