Definition at line 127 of file TrackParameterAnalyzer.cc.
References EnergyCorrector::c, funct::cos(), gather_cfg::cout, edmSimTrackContainerToken_, edmSimVertexContainerToken_, edm::Event::getByToken(), h1_Beff_, h1_par0_, h1_par1_, h1_par2_, h1_par3_, h1_par4_, h1_pull0_, h1_pull1_, h1_pull2_, h1_pull3_, h1_pull4_, h1_res0_, h1_res1_, h1_res2_, h1_res3_, h1_res4_, h2_dvsphi_, reco::TrackBase::i_dsz, reco::TrackBase::i_dxy, reco::TrackBase::i_lambda, reco::TrackBase::i_phi, reco::TrackBase::i_qoverp, kappa, M_PI, match(), AlCaHLTBitMon_ParallelJobs::p, funct::pow(), class-composition::Q, lumiQueryAPI::q, recoTrackCollectionToken_, hiRegitInitialStep_cff::recTracks, alignCSCRings::s, simUnit_, funct::sin(), mathSSE::sqrt(), protons_cff::t, findQualityFiles::v, and verbose_.
129 using CLHEP::HepLorentzVector;
131 const double fBfield=3.8;
136 std::cout <<
"SimVertex " << simVtcs->size() << std::endl;
137 for(edm::SimVertexContainer::const_iterator
v=simVtcs->begin();
138 v!=simVtcs->end(); ++
v){
140 << std::setw(10) << std::setprecision(4)
141 <<
v->position().x() <<
" " 142 <<
v->position().y() <<
" " 143 <<
v->position().z() <<
" " 144 <<
v->parentIndex() <<
" " 145 <<
v->noParent() <<
" " 155 std::vector<ParameterVector > tsim;
156 for(edm::SimTrackContainer::const_iterator
t=simTrks->begin();
157 t!=simTrks->end(); ++
t){
159 std::cout <<
"simtrk has no vertex" << std::endl;
163 HepLorentzVector
v((*simVtcs)[
t->vertIndex()].position().x(),
164 (*simVtcs)[
t->vertIndex()].position().y(),
165 (*simVtcs)[
t->vertIndex()].position().z(),
166 (*simVtcs)[
t->vertIndex()].position().e());
167 int pdgCode=
t->type();
171 std::cout <<
"funny particle skipped , code=" << pdgCode << std::endl;
174 if ((pdgCode==11)||(pdgCode==13)||(pdgCode==15)||(pdgCode==-211)||(pdgCode==-2212)||(pdgCode==321)){Q=-1;}
175 else if((pdgCode==-11)||(pdgCode==-13)||(pdgCode==-15)||(pdgCode==211)||(pdgCode==2212)||(pdgCode==321)){Q=1;}
179 HepLorentzVector
p(
t->momentum().x(),
t->momentum().y(),
t->momentum().z(),
t->momentum().e());
182 <<
" gen=" << std::setw( 4) <<
t->genpartIndex()
183 <<
" vtx=" << std::setw( 4) <<
t->vertIndex()
184 <<
" pdg=" << std::setw( 5) <<
t->type()
185 <<
" Q=" << std::setw( 3) << Q
186 <<
" pt=" << std::setw(6) <<
p.perp()
187 <<
" vx=" << std::setw(6) <<
v.x()
188 <<
" vy=" << std::setw(6) <<
v.y()
189 <<
" vz=" << std::setw(6) <<
v.z()
192 if ( (Q != 0) && (
p.perp()>0.1) ){
196 double kappa=-Q*0.002998*fBfield/
p.perp();
197 double D0=x0*
sin(
p.phi())-y0*
cos(
p.phi())-0.5*kappa*(x0*x0+y0*y0);
198 double q=
sqrt(1.-2.*kappa*D0);
199 double s0=(x0*
cos(
p.phi())+y0*
sin(
p.phi()))/
q;
201 if (fabs(kappa*s0)>0.001){
202 s1=asin(kappa*s0)/
kappa;
204 double ks02=(kappa*s0)*(kappa*s0);
205 s1=s0*(1.+ks02/6.+3./40.*ks02*ks02+5./112.*
pow(ks02,3));
226 for(reco::TrackCollection::const_iterator
t=recTracks->begin();
227 t!=recTracks->end(); ++
t){
231 std::cout <<
"reco pars= " << p << std::endl;
233 for(std::vector<ParameterVector>::const_iterator
s=tsim.begin();
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
math::Vector< dimension >::type ParameterVector
parameter vector
bool match(const ParameterVector &a, const ParameterVector &b)
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
Cos< T >::type cos(const T &t)
edm::EDGetTokenT< reco::TrackCollection > recoTrackCollectionToken_
edm::EDGetTokenT< edm::SimVertexContainer > edmSimVertexContainerToken_
reco::TrackBase::ParameterVector ParameterVector
static const G4double kappa
Power< A, B >::type pow(const A &a, const B &b)
math::Error< dimension >::type CovarianceMatrix
5 parameter covariance matrix