37 long long totGsfTrack=0;
40 long long totAlgo[12];
42 if (l>0) ++totLoop;
else ++totTrack;
44 void hits(
int f,
int l) { totFound+=
f; totLost+=
l;}
45 void gsf() {++totGsfTrack;}
46 void algo(
int a) {
if (a>=0 && a<12) ++totAlgo[
a];}
50 std::cout <<
"TrackProducer stat\nTrack/Loop/Gsf/FoundHits/LostHits/algos "
51 << totTrack <<
'/'<< totLoop <<
'/'<< totGsfTrack <<
'/'<< totFound <<
'/'<< totLost;
56 ~StatCount() {
print();}
85 int qualityMask,
signed char nLoops)
99 theTraj->setSeedRef(seedRef);
101 statCount.hits(theTraj->foundHits(),theTraj->lostHits());
102 statCount.algo(
int(
algo_));
112 for (
auto const & tm : theTraj->measurements()) {
113 auto const &
h = tm.recHitR();
114 if (
h.isValid()) ndof = ndof +
float(
h.dimension())*
h.weight();
126 stateForProjectionToBeamLineOnSurface = theTraj->closestMeasurement(
GlobalPoint(bs.
x0(),bs.
y0(),bs.
z0())).updatedState();
129 stateForProjectionToBeamLineOnSurface = theTraj->firstMeasurement().updatedState();
131 stateForProjectionToBeamLineOnSurface = theTraj->lastMeasurement().updatedState();
136 edm::LogError(
"CannotPropagateToBeamLine")<<
"the state on the closest measurement isnot valid. skipping track.";
142 LogDebug(
"TrackProducer") <<
"stateForProjectionToBeamLine=" << stateForProjectionToBeamLine;
157 LogDebug(
"TrackProducer") <<
"pos=" << v <<
" mom=" << p <<
" pt=" << p.
perp() <<
" mag=" << p.mag();
168 LogDebug(
"TrackProducer") <<
"theTrack->pt()=" << theTrack->
pt();
170 LogDebug(
"TrackProducer") <<
"track done\n";
172 AlgoProduct aProduct(theTraj,std::make_pair(theTrack,seedDir));
173 algoResults.push_back(aProduct);
175 statCount.track(nLoops);
190 int qualityMask,
signed char nLoops)
201 theTraj =
new Trajectory( std::move(trajTmp) );
202 theTraj->setSeedRef(seedRef);
231 for (
auto const & tm : theTraj->measurements()) {
232 auto const &
h = tm.recHitR();
233 if (
h.isValid()) ndof = ndof +
h.dimension()*
h.weight();
245 stateForProjectionToBeamLineOnSurface = theTraj->closestMeasurement(
GlobalPoint(bs.
x0(),bs.
y0(),bs.
z0())).updatedState();
248 stateForProjectionToBeamLineOnSurface = theTraj->firstMeasurement().updatedState();
250 stateForProjectionToBeamLineOnSurface = theTraj->lastMeasurement().updatedState();
255 edm::LogError(
"CannotPropagateToBeamLine")<<
"the state on the closest measurement isnot valid. skipping track.";
262 LogDebug(
"GsfTrackProducer") <<
"stateForProjectionToBeamLine=" << stateForProjectionToBeamLine;
277 LogDebug(
"GsfTrackProducer") <<
"pos=" << v <<
" mom=" << p <<
" pt=" << p.
perp() <<
" mag=" << p.mag();
287 LogDebug(
"GsfTrackProducer") <<
"track done\n";
289 AlgoProduct aProduct(theTraj,std::make_pair(theTrack,seedDir));
290 LogDebug(
"GsfTrackProducer") <<
"track done1\n";
291 algoResults.push_back(aProduct);
292 LogDebug(
"GsfTrackProducer") <<
"track done2\n";
PropagationDirection direction() const
void setQualityMask(int qualMask)
double z0() const
z coordinate
bool geometricInnerState_
int nominalValue() const
The nominal field value for this map in kGauss.
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
Global3DPoint GlobalPoint
TrackCharge charge() const
std::vector< AlgoProduct > AlgoProductCollection
const MagneticField * magneticField() const
const CurvilinearTrajectoryError & curvilinearError() const
std::vector< ConstRecHitPointer > RecHitContainer
bool buildTrack(const TrajectoryFitter *, const Propagator *, AlgoProductCollection &, TransientTrackingRecHit::RecHitContainer &, TrajectoryStateOnSurface &, const TrajectorySeed &, float, const reco::BeamSpot &, SeedRef seedRef=SeedRef(), int qualityMask=0, signed char nLoops=0)
Construct Tracks to be put in the event.
void setNLoops(signed char value)
std::pair< Trajectory *, std::pair< reco::Track *, PropagationDirection > > AlgoProduct
double pt() const
track transverse momentum
FreeTrajectoryState const * freeState(bool withErrors=true) const
Abs< T >::type abs(const T &t)
virtual Trajectory fitOne(const Trajectory &traj, fitType type=standard) const =0
GlobalVector momentum() const
FTS const & trackStateAtPCA() const
GlobalPoint position() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
reco::TrackBase::TrackAlgorithm algo_
void setAlgorithm(const TrackAlgorithm a, bool set=true)
position index
double y0() const
y coordinate
double x0() const
x coordinate