22 #include "TDatabasePDG.h"
43 for (
unsigned int i=0; i<
hits_.size(); ++i) {
52 mcTrackId_(other.mcTrackId_),
55 state6D_(other.state6D_),
61 for (
unsigned int i=0; i<other.
hits_.size(); ++i) {
100 detId =
hits_.at(i)->getDetId();
101 hitId =
hits_[i]->getHitId();
109 detId =
hits_.at(i)->getDetId();
110 hitId =
hits_[i]->getHitId();
111 sortingParameter =
hits_[i]->getSortingParameter();
119 detId =
hits_.at(i)->getDetId();
120 hitId =
hits_[i]->getHitId();
121 planeId =
hits_[i]->getPlaneId();
131 std::vector<int> result;
132 for(
unsigned int i=0; i<
hits_.size(); ++i){
133 if(detId==-2 ||
hits_[i]->getDetId() == detId) {
134 result.push_back(
hits_[i]->getHitId());
141 std::vector<int> result;
142 for(
unsigned int i=0; i<
hits_.size(); ++i){
143 result.push_back(
hits_[i]->getDetId());
149 std::vector<double> result;
150 for(
unsigned int i=0; i<
hits_.size(); ++i){
151 result.push_back(
hits_[i]->getSortingParameter());
157 std::set<int> retVal;
158 for (
unsigned int i = 0; i <
hits_.size(); ++i) {
159 retVal.insert(
hits_[i]->getDetId());
167 TParticlePDG*
part = TDatabasePDG::Instance()->GetParticle(
pdg_);
168 q_ = part->Charge() / (3.);
174 for (
unsigned int i=0; i<
hits_.size(); ++i) {
183 for (
unsigned int i = 0; i <
hits_.size(); ++i){
184 if (detId ==
hits_[i]->getDetId() && hitId ==
hits_[i]->getHitId())
193 for (
unsigned int i = 0; i < lhs.
getNHits(); ++i){
203 printOut <<
"======== TrackCand::print ========\n";
205 printOut <<
"seed values for 6D state: \n";
209 for(
unsigned int i=0; i<
hits_.size(); ++i){
216 for(
unsigned int i=0; i<rhs.
getNHits(); ++i){
229 const unsigned int nHits(
getNHits());
230 if (indices.size() != nHits){
232 Exception exc(
"TrackCand::sortHits ==> Size of indices != number of hits!",__LINE__,__FILE__);
237 std::vector<TrackCandHit*> sortedHits(nHits);
238 for (
unsigned int i=0; i<nHits; ++i){
239 sortedHits[i] =
hits_[indices[i]];
247 if (
pdg_ != 0 &&
q_ != charge)
259 if (
pdg_ != 0 &&
q_ != charge)
286 const TVector3&
mom,
const double charge)
293 const TVector3&
mom,
const int pdgCode)