6 inline double sqr(
double a){
return a*
a;}
10 :_conf(conf),seedCollection(0),seedCollectionOfSourceTracks(0),
11 hitsfactoryPSet(conf.getParameter<edm::
ParameterSet>(
"OrderedHitsFactoryPSet")),
12 creatorPSet(conf.getParameter<edm::
ParameterSet>(
"SeedCreatorPSet")),
13 regfactoryPSet(conf.getParameter<edm::
ParameterSet>(
"RegionFactoryPSet")),
14 theClusterCheck(conf.getParameter<edm::
ParameterSet>(
"ClusterCheckPSet")),
15 theSilentOnClusterCheck(conf.getParameter<edm::
ParameterSet>(
"ClusterCheckPSet").getUntrackedParameter<bool>(
"silentClusterCheck",
false)),
16 _vtxMinDoF(conf.getParameter<double>(
"vtxMinDoF")),
17 _maxDZSigmas(conf.getParameter<double>(
"maxDZSigmas")),
18 _maxNumSelVtx(conf.getParameter<uint32_t>(
"maxNumSelVtx")),
19 _applyTkVtxConstraint(conf.getParameter<bool>(
"applyTkVtxConstraint")),
21 _primaryVtxInputTag(conf.getParameter<edm::InputTag>(
"primaryVerticesTag")),
22 _beamSpotInputTag(conf.getParameter<edm::InputTag>(
"beamSpotInputTag"))
62 edm::LogError(
"TooManyClusters") <<
"Found too many clusters (" << clustsOrZero <<
"), bailing out.\n";
93 ss <<
"\n++++++++++++++++++\n";
104 for (
IR ir=
regions.begin(), irEnd=
regions.end(); ir < irEnd; ++ir)
delete (*ir);
132 std::vector<reco::Vertex> selectedPriVtxCompatibleWithTrack;
134 selectedPriVtxCompatibleWithTrack.push_back(*(
vertexHandle->begin()));
144 edm::LogInfo(
"debugTrajSeedFromSingleLeg") <<
"Inspected " <<
sel <<
" tracks over " << idx <<
" tracks. \t # tracks providing at least one seed " <<
_countSeedTracks ;
151 std::vector< std::pair< double, short> > idx;
154 double cosPhi=tk.
px()/tk.
pt();
155 double sinPhi=tk.
py()/tk.
pt();
166 double cotTheta=tk.
pz()/tk.
pt();
172 double sxy2=
sqr(cosPhi*cotTheta)*sx2+
173 sqr(sinPhi*cotTheta)*sy2+
174 sqr(cotTheta*(-dx*sinPhi+dy*cosPhi))*sphi2+
175 sqr((1+cotTheta*cotTheta)*(dx*cosPhi+dy*sinPhi))*stheta2;
180 ss <<
" primary vtx " << vtx.
position() <<
" \tk vz " << tk.
vz() <<
" vx " << tk.
vx() <<
" vy " << tk.
vy() <<
" pz/pt " << tk.
pz()/tk.
pt() <<
" \t dz " << _dz <<
" \t " << _dzError <<
" sxy2 "<< sxy2<<
" \t dz/dzErr " << _dz/_dzError<< std::endl;
185 idx.push_back(std::pair<double,short>(fabs(_dz),count));
189 ss <<
"no vertex selected " << std::endl;
194 std::stable_sort(idx.begin(),idx.end(),
lt_);
198 ss <<
"selected vtx dz " << idx[0].first <<
" position" << idx[0].second << std::endl;
208 bool foundAtLeastASeedCand=
false;
209 BOOST_FOREACH(
const reco::Vertex vtx, selectedPriVtxCompatibleWithTrack){
217 ss <<
"[PrintRegion] " << region.
print() << std::endl;
227 !foundAtLeastASeedCand
229 foundAtLeastASeedCand=
true;
319 float originRBound = 3;
320 float originZBound = 3.;
336 GlobalVector originBounds(originRBound,originRBound,originZBound);
339 primaryVertexPoint.y(),
340 primaryVertexPoint.z()
345 ss <<
"\nConversion Point " << originPos <<
" " << originPos.
perp() <<
"\n";
350 unsigned int nHitss = hitss.
size();
356 ss <<
"\n nHitss " << nHitss <<
"\n";
361 for (
unsigned int iHits = 0; iHits < nHitss; ++iHits) {
364 ss <<
"\n iHits " << iHits <<
"\n";
edm::ParameterSet hitsfactoryPSet
T getParameter(std::string const &) const
SeedForPhotonConversion1Leg * theSeedCreator
void analyze(const edm::Event &event, const edm::EventSetup &setup)
IdealHelixParameters _IdealHelixParameters
void setMagnField(const MagneticField *magnField)
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
ClusterChecker theClusterCheck
Global3DPoint GlobalPoint
edm::InputTag _primaryVtxInputTag
edm::ParameterSet regfactoryPSet
virtual unsigned int size() const =0
virtual const TrajectorySeed * trajectorySeed(TrajectorySeedCollection &seedCollection, const SeedingHitSet &hits, const GlobalPoint &vertex, const GlobalVector &vertexBounds, float ptmin, const edm::EventSetup &es, float cotTheta, std::stringstream &ss)
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
TrajectorySeedCollection * seedCollection
double px() const
x coordinate of momentum vector
CombinedHitPairGeneratorForPhotonConversion * theHitsGenerator
const Point & position() const
position
CovarianceMatrix covariance() const
return track covariance matrix
math::XYZVector GetMomentumAtTangentPoint() const
U second(std::pair< T, U > const &p)
const OrderedHitPairs & run(const ConversionRegion &convRegion, const TrackingRegion ®ion, const edm::Event &ev, const edm::EventSetup &es)
const edm::EventSetup * myEsetup
const edm::ParameterSet _conf
math::XYZVector GetTangentPoint() const
edm::ParameterSet creatorPSet
std::vector< TrajectorySeed > TrajectorySeedCollection
const MagneticField * magField
edm::InputTag _beamSpotInputTag
double pt() const
track transverse momentum
size_t tooManyClusters(const edm::Event &e) const
void print(std::stringstream &ss, const SiStripCluster &clus)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool inspectTrack(const reco::Track *track, const TrackingRegion ®ion, math::XYZPoint &primaryVertexPoint)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double pz() const
z coordinate of momentum vector
bool _applyTkVtxConstraint
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double dzError() const
error on dz
double vz() const
z coordinate of the reference point on track
void loopOnPriVtx(const reco::Track &tk, const std::vector< reco::Vertex > &selectedPriVtxCompatibleWithTrack)
const edm::Event * myEvent
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
bool rejectTrack(const reco::Track &track)
TrajectorySeedCollection * seedCollectionOfSourceTracks
edm::Handle< reco::VertexCollection > vertexHandle
double vy() const
y coordinate of the reference point on track
virtual std::vector< TrackingRegion * > regions(const edm::Event &ev, const edm::EventSetup &) const
Square< F >::type sqr(const F &f)
bool theSilentOnClusterCheck
bool lt_(std::pair< double, short > a, std::pair< double, short > b)
Regions::const_iterator IR
virtual std::string print() const =0
edm::Handle< reco::BeamSpot > recoBeamSpotHandle
edm::Handle< reco::TrackCollection > trackCollectionH
int charge() const
track electric charge
void setData(const reco::Track *track, math::XYZVector refPoint=math::XYZVector(0, 0, 0))
GlobalTrackingRegionProducerFromBeamSpot * theRegionProducer
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
bool selectPriVtxCompatibleWithTrack(const reco::Track &tk, std::vector< reco::Vertex > &selectedPriVtxCompatibleWithTrack)
PhotonConversionTrajectorySeedProducerFromSingleLegAlgo(const edm::ParameterSet &)
double py() const
y coordinate of momentum vector
double vx() const
x coordinate of the reference point on track
double thetaError() const
error on theta