43 <<
"Initializing KVF TEST analyser - Output file: " << outputFile_ <<
"\n";
73 cout <<
"Reconstructing event number: " << iEvent.
id() <<
"\n";
81 <<
"Couln't find track collection: " << iEvent.
id()
86 <<
"Found: " << (*tks).size() <<
" reconstructed tracks" <<
"\n";
87 cout <<
"got " << (*tks).size() <<
" tracks " << endl;
94 vector<TransientTrack> t_tks = (*theB).build(tks);
96 cout <<
"Found: " << t_tks.size() <<
" reconstructed tracks" <<
"\n";
99 if (t_tks.size() > 3) {
108 vector<TransientTrack> ttv;
109 ttv.push_back(t_tks[0]); ttv.push_back(t_tks[1]); ttv.push_back(t_tks[2]);ttv.push_back(t_tks[3]);
128 float muon_sigma = 0.0000001;
129 float kaon_sigma = 0.000016;
136 vector<RefCountedKinematicParticle> muonParticles;
137 vector<RefCountedKinematicParticle> phiParticles;
138 vector<RefCountedKinematicParticle> allParticles;
139 muonParticles.push_back(pFactory.
particle (ttMuPlus,muon_mass,chi,ndf,muon_sigma));
140 muonParticles.push_back(pFactory.
particle (ttMuMinus,muon_mass,chi,ndf,muon_sigma));
141 allParticles.push_back(pFactory.
particle (ttMuPlus,muon_mass,chi,ndf,muon_sigma));
142 allParticles.push_back(pFactory.
particle (ttMuMinus,muon_mass,chi,ndf,muon_sigma));
144 phiParticles.push_back(pFactory.
particle (ttKPlus,kaon_mass,chi,ndf,kaon_sigma));
145 phiParticles.push_back(pFactory.
particle (ttKMinus,kaon_mass,chi,ndf,kaon_sigma));
146 allParticles.push_back(pFactory.
particle (ttKPlus,kaon_mass,chi,ndf,kaon_sigma));
147 allParticles.push_back(pFactory.
particle (ttKMinus,kaon_mass,chi,ndf,kaon_sigma));
155 cout <<
"Simple vertex fit with KinematicParticleVertexFitter:\n";
174 cout <<
"\nGlobal fit done:\n";
187 float jp_m_sigma = 0.00004;
191 jpTree = csFitter.
fit(jpsi_c2,jpTree);
195 jpTree->movePointerToTheTop();
197 phiParticles.push_back(jpsi_part);
203 cout <<
"Sequential fit done:\n";
225 cout <<
"Exception during event number: " << iEvent.
id()
226 <<
"\n" << err.what() <<
"\n";
233 if (myVertex->vertexIsValid()) {
234 cout <<
"Decay vertex: " << myVertex->position() <<myVertex->chiSquared()<<
" "<<myVertex->degreesOfFreedom()<<endl;
235 }
else cout <<
"Decay vertex Not valid\n";
240 cout <<
"Particle: \n";
246 cout <<
"Momentum at vertex: " << myParticle->currentState().globalMomentum ()<<endl;
247 cout <<
"Parameters at vertex: " << myParticle->currentState().kinematicParameters().vector()<<endl;
252 if (!myTree->isValid()) {
253 cout <<
"Tree is invalid. Fit failed.\n";
258 myTree->movePointerToTheTop();
270 vector< RefCountedKinematicParticle > bs_children = myTree->finalStateParticles();
272 for (
unsigned int i=0;
i< bs_children.size();++
i) {
277 bool child = myTree->movePointerToTheFirstChild();
279 if(child)
while (myTree->movePointerToTheNextChild()) {
291 iEvent.
getByLabel(
"trackingtruth",
"VertexTruth",TVCollectionH);
307 return *(tPC.begin());
std::vector< RefCountedKinematicTree > fit(KinematicConstraint *cs, std::vector< RefCountedKinematicTree > trees) const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
RefCountedKinematicTree fit(std::vector< RefCountedKinematicParticle > part)
TrackAssociatorByChi2 * associatorForParamAtPca
void printout(const RefCountedKinematicVertex &myVertex) const
#define DEFINE_FWK_MODULE(type)
edm::ParameterSet kvfPSet
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
KineExample(const edm::ParameterSet &)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
GlobalPoint position() const
TrackingVertex getSimVertex(const edm::Event &iEvent) const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
RefCountedKinematicTree fit(std::vector< RefCountedKinematicParticle > particles) const
std::vector< TrackingVertex > TrackingVertexCollection
T const * product() const
T const * product() const
RefCountedKinematicParticle particle(const reco::TransientTrack &initialTrack, const ParticleMass &massGuess, float chiSquared, float degreesOfFr, float &m_sigma) const
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")