41 m_b =
new TH1F(
"b",
"Impact parameter",35,0.,35.0);
50 "Phi - PhiR positive eta",
53 "Phi - PhiR negative eta",
57 20,0,20, 30,-7.5,7.5, 25,0,5000);
59 "Tracks vs b, eta, pt",
60 20,0,20, 30,-7.5,7.5, 25,0,5000);
62 SmartIF<ITHistSvc> rootHistSvc{Gaudi::svcLocator()->service(
"THistSvc")};
65 return StatusCode::FAILURE;
68 std::string StreamAndPath=
"/FlowOutPut/";
69 std::string histPath = StreamAndPath;
70 if ( rootHistSvc->regHist(histPath+
m_hgenerated->GetName(),
72 msg(MSG::WARNING) <<
"Can't book "
75 if ( rootHistSvc->regHist(histPath+
m_b->GetName(),
77 msg(MSG::WARNING) <<
"Can't book "
80 if ( rootHistSvc->regHist(histPath+
m_phi->GetName(),
82 msg(MSG::WARNING) <<
"Can't book "
85 if ( rootHistSvc->regHist(histPath+
m_phiR->GetName(),
87 msg(MSG::WARNING) <<
"Can't book "
92 msg(MSG::WARNING) <<
"Can't book "
97 msg(MSG::WARNING) <<
"Can't book "
102 msg(MSG::WARNING) <<
"Can't book "
107 msg(MSG::WARNING) <<
"Can't book "
112 msg(MSG::WARNING) <<
"Can't book "
115 if ( rootHistSvc->regHist(histPath+
m_v2betapth->GetName(),
117 msg(MSG::WARNING) <<
"Can't book "
120 if ( rootHistSvc->regHist(histPath+
m_ebetapth->GetName(),
122 msg(MSG::WARNING) <<
"Can't book "
129 return StatusCode::SUCCESS;
133 msg(MSG::INFO) <<
">>> CheckFlow from execute" <<
endmsg;
139 float b = hijing_pars->get_b();
140 float phiR = hijing_pars->get_bphi();
145 return StatusCode::SUCCESS;
150 float ngenerated = 0;
151 double phiv1_recon, phiv1_recop;
152 double phiv1_reco = 0, phiv2_reco = 0;
153 double phi_reco_sin1phip = 0, phi_reco_cos1phip = 0;
154 double phi_reco_sin1phin = 0, phi_reco_cos1phin = 0;
155 double phi_reco_sin2phi = 0, phi_reco_cos2phi = 0;
157 std::vector<HepMC::ConstGenParticlePtr>
particles;
159 if (
stat.isFailure()) {
165 int pid = pitr->pdg_id();
166 int p_stat = pitr->status();
167 double pt = pitr->momentum().perp();
168 double rapid = pitr->momentum().pseudoRapidity();
169 double phi = pitr->momentum().phi();
171 <<
" PID = " <<
pid <<
" Status = " << p_stat
172 <<
" Eta = " << rapid <<
" Phi = " << phi
173 <<
" PhiR = " << phiR <<
endmsg;
178 m_phi->Fill(phi, 1.);
179 double phi_corr = phi - phiR;
185 int kpi = (
int)(phi_corr/(2*
M_PI));
186 phi_corr -= kpi * 2*
M_PI;
187 if (phi_corr < -
M_PI) phi_corr += 2*
M_PI;
188 if (phi_corr >
M_PI) phi_corr -= 2*
M_PI;
195 phi_reco_sin1phip +=
std::sin(1*phi);
196 phi_reco_cos1phip +=
std::cos(1*phi);
198 phi_reco_sin1phin +=
std::sin(1*phi);
199 phi_reco_cos1phin +=
std::cos(1*phi);
201 phi_reco_sin2phi +=
std::sin(2*phi);
202 phi_reco_cos2phi +=
std::cos(2*phi);
208 phiv1_recop = std::atan2( phi_reco_sin1phip,phi_reco_cos1phip );
209 phiv1_recon = std::atan2( phi_reco_sin1phin,phi_reco_cos1phin ) +
M_PI;
210 if( phiv1_recon >
M_PI ) phiv1_recon -= 2*
M_PI;
212 phiv1_reco = (phiv1_recop + phiv1_recon)/2;
213 phiv2_reco = 0.5 * std::atan2( phi_reco_sin2phi,phi_reco_cos2phi );
215 <<
" PhiR = " << phiR
216 <<
" PhiV1Reco = " << phiv1_reco
217 <<
" PhiV2Reco = " << phiv2_reco <<
endmsg;
220 double phiR_v1corr = phiR;
221 if( phiR >
M_PI ) phiR_v1corr = phiR_v1corr - 2*
M_PI;
223 double phiR_v2corr = phiR;
224 if (phiR >
M_PI/2) phiR_v2corr -=
M_PI;
225 if (phiR > 3*
M_PI/2) phiR_v2corr -= 2*
M_PI;
230 return StatusCode::SUCCESS;
234 msg(MSG::INFO) <<
">>> CheckFlow from finalize" <<
endmsg;
236 return StatusCode::SUCCESS;