19 VertexAnalysis(
n ), m_initialised(false), m_finalised(false), m_use_secVtx_limits(use_secVtx_limits),
m_dir(0) { }
30 std::cerr <<
"ConfVtxAnalysis::initialise() " <<
name() <<
" already initialised" << std::endl;
44 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
45 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5,
46 21.5, 22.5, 24.5, 25.5, 27.5, 29.5,
47 31.5, 33.5, 35.5, 38.5,
57 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5,
58 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5,
59 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5,
60 31.5, 32.5, 33.5, 34.5, 36.5, 37.5, 39.5,
61 40.5, 42.5, 43.5, 45.5, 47.5, 49.5,
62 50.5, 52.5, 54.5, 57.5, 59.5,
63 61.5, 63.5, 66.5, 69.5,
81 double vnbins[101] = {
83 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 17.5, 18.5, 19.5, 21.5,
84 23.5, 24.5, 26.5, 28.5, 30.5, 32.5, 35.5, 37.5, 40.5, 43.5, 46.5, 50.5, 53.5, 57.5, 61.5, 66.5, 71.5, 76.5, 81.5, 87.5,
85 93.5, 100.5, 107.5, 114.5, 123.5, 131.5, 141.5, 150.5, 161.5, 172.5, 185.5, 198.5, 211.5, 226.5, 242.5, 259.5, 277.5, 297.5, 317.5, 340.5,
86 363.5, 389.5, 416.5, 445.5, 476.5, 509.5,
87 544.5, 582.5, 623.5, 666.5, 713.5, 762.5, 815.5, 872.5, 933.5, 998.5, 1067.5,
88 1141.5, 1221.5, 1305.5, 1396.5, 1493.5, 1597.5,
89 1708.5, 1827.5, 1953.5, 2089.5,
90 2234.5, 2389.5, 2555.5,
91 2733.5, 2923.5, 3125.5,
98 double vrbins[41] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
99 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
100 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
101 30, 33, 36, 39, 42, 45,
105 m_hnvtx =
new TH1F(
"nvtx",
";number of vertices", 101, -0.5, 100.5 );
106 m_hzed =
new TH1F(
"zed",
";vtx z [mm]", 200, -300, 300 );
107 m_hx =
new TH1F(
"x",
";vtx x [mm]", 800, -1, 1 );
108 m_hy =
new TH1F(
"y",
";vtx y [mm]", 800, -1, 1 );
109 m_hr =
new TH1F(
"r",
";vtx r [mm]", 40, vrbins );
111 m_hmu =
new TH1F(
"mu",
";<mu>", 81, -0.5, 80.5 );
112 m_hlb =
new TH1F(
"lb",
";lumi block", 301, -0.5, 3009.5 );
114 m_hnvtx_rec =
new TH1F(
"nvtx_rec",
";number of vertices", 101, -0.5, 100.5 );
115 m_hzed_rec =
new TH1F(
"zed_rec",
";vtx z [mm]", 200, -300, 300 );
116 m_hx_rec =
new TH1F(
"x_rec",
";vtx x [mm]", 800, -1, 1 );
117 m_hy_rec =
new TH1F(
"y_rec",
";vtx y [mm]", 800, -1, 1 );
118 m_hr_rec =
new TH1F(
"r_rec",
";vtx r [mm]", 40, vrbins );
122 m_hntrax =
new TH1F(
"ntrax",
";number of tracks", 14, -0.5, 13.5 );
123 m_hntrax_rec =
new TH1F(
"ntrax_rec",
";number of tracks", 14, -0.5, 13.5 );
124 m_h_dntrax =
new TH1F(
"dntrax",
";trigger - offline tracks", 61, -30.5, 30.5 );
127 m_hntrax =
new TH1F(
"ntrax",
";number of tracks", 80, vnbins );
129 m_h_dntrax =
new TH1F(
"dntrax",
";trigger - offline tracks", 15, -7.5, 7.5 );
134 m_hx_res =
new TH1F(
"x_res",
"Delta x [mm]", 200, -0.1, 0.1 );
135 m_hy_res =
new TH1F(
"y_res",
"Delta y [mm]", 200, -0.1, 0.1 );
174 for (
size_t i=0 ;
i<
v.size() ;
i++ ) {
175 if (
v[
i] )
s <<
"\t" << *
v[
i] <<
"\n";
176 else s <<
"\t" <<
"----\n";
182 const std::vector<TIDA::Vertex*>& vtx1,
191 std::cout <<
"ConfVtxAnalysis::execute() " <<
name()
192 <<
"\tvtx0.size() " << vtx0.size()
193 <<
"\tvtx1.size() " << vtx1.size()
196 std::cout <<
"\tref: " << vtx0 << std::endl;
197 std::cout <<
"\ttest: " << vtx1 << std::endl;
201 if ( vtx0[0]->tracks().
size() > 0 ) {
203 execute_internal<VertexNewMatcher>(vtx0, vtx1,
m, tevt);
207 execute_internal<VertexMatcher>(vtx0, vtx1,
m, tevt);
212 template<
typename Matcher>
214 const std::vector<TIDA::Vertex*>& vtx1,
218 m.match( vtx0, vtx1 );
231 double mu = tevt->
mu();
234 for (
unsigned i=0 ;
i<vtx0.size() ;
i++ ) {
237 if ( vtx0[
i]->Ntracks() == 0 )
continue;
240 double r = std::sqrt(vtx0[
i]->
x()*vtx0[
i]->
x() + vtx0[
i]->
y()*vtx0[
i]->
y());
242 m_hx->Fill( vtx0[
i]->
x() );
243 m_hy->Fill( vtx0[
i]->
y() );
261 double r_rec = std::sqrt(mv->
x()*mv->
x() + mv->
y()*mv->
y());
263 int dntrax = mv->
Ntracks() - vtx0[
i]->Ntracks();
319 static int vtxcount=0;
321 if ( vtxcount<100 ) {
322 std::cout <<
"ConfVtxAnalysis::execute() " <<
name() <<
"\tnomatch\n"
323 <<
"\tvtx0.size() " << vtx0.size()
324 <<
"\tvtx1.size() " << vtx1.size()
327 std::cout <<
"\tref: " << vtx0 << std::endl;
328 std::cout <<
"\ttest: " << vtx1 << std::endl;
358 std::cout <<
"ConfVtxAnalysis::finalise() " <<
name() << std::endl;
379 std::cout <<
"finalising resplots" << std::endl;