56 theEtaRegionPar1 = par.
getParameter<
double>(
"EtaR_UpperLimit_Par1");
57 theEtaRegionPar2 = par.
getParameter<
double>(
"EtaR_UpperLimit_Par2");
58 thePhiRegionPar1 = par.
getParameter<
double>(
"PhiR_UpperLimit_Par1");
59 thePhiRegionPar2 = par.
getParameter<
double>(
"PhiR_UpperLimit_Par2");
62 useFixedRegion = par.
getParameter<
bool>(
"UseFixedRegion");
121 LogDebug(
"MuonTrackingRegionBuilder")<<
"from state: "<<muFTS;
129 if ( staTrack.
p() > 1.5 ) {
135 double deltaZatVTX = 0.0;
139 bool bsHandleFlag = theEvent->getByToken(bsHandleToken, bsHandle);
149 bool vtxHandleFlag = theEvent->getByToken(vertexCollectionToken, vertexCollection);
151 if ( vtxHandleFlag && !vertexCollection->empty() ) {
153 reco::VertexCollection::const_iterator vtx = vertexCollection->begin();
154 vertexPos =
GlobalPoint(vtx->x(),vtx->y(),vtx->z());
156 deltaZatVTX = vtx->zError() * theNsigmaDz;
168 if ( bsHandleFlag ) {
183 double deltaTheta = trackPerigeeErrors.
thetaError();
184 double theta = pTrack.theta();
185 double sin_theta =
sin(theta);
188 deta = theNsigmaEta*(1/fabs(sin_theta))*deltaTheta;
189 dphi = theNsigmaPhi*(trackPerigeeErrors.
phiError());
198 double region_dEta = 0;
199 double region_dPhi = 0;
200 double eta=0;
double phi=0;
203 float pt = fabs(mom.perp());
207 float acoeff_Phi = (thePhiRegionPar2 - thePhiRegionPar1)/5;
208 float acoeff_Eta = (theEtaRegionPar2 - theEtaRegionPar1)/5;
210 eta = theEtaRegionPar1 + (acoeff_Eta)*(mom.perp()-5.);
211 phi = thePhiRegionPar1 + (acoeff_Phi)*(mom.perp()-5.) ;
214 if ( pt > 10. && pt < 100. ) {
215 eta = theEtaRegionPar2;
216 phi = thePhiRegionPar2;
221 float acoeff_Phi = (thePhiRegionPar1 - thePhiRegionPar2)/900;
222 float acoeff_Eta = (theEtaRegionPar1 - theEtaRegionPar2)/900;
224 eta = theEtaRegionPar2 + (acoeff_Eta)*(mom.perp()-100.);
225 phi = thePhiRegionPar2 + (acoeff_Phi)*(mom.perp()-100.);
229 double region_dPhi1 =
min(phi,dphi);
230 double region_dEta1 =
min(eta,deta);
233 region_dPhi =
max(thePhiMin,region_dPhi1);
234 region_dEta =
max(theEtaMin,region_dEta1);
239 deltaZ =
max(theHalfZ,deltaZatVTX);
245 double minPt =
max(theTkEscapePt,mom.perp()*0.6);
249 if (useFixedRegion) {
250 region_dEta = theEtaFixed;
251 region_dPhi = thePhiFixed;
255 if(!theMeasurementTrackerToken.isUninitialized()) {
257 theEvent->getByToken(theMeasurementTrackerToken, hmte);
258 measurementTracker = hmte.
product();
263 deltaZ, region_dEta, region_dPhi,
268 LogDebug(
"MuonTrackingRegionBuilder")<<
"the region parameters are:\n"
269 <<
"\n dirVector: "<<dirVector
270 <<
"\n vertexPos: "<<vertexPos
271 <<
"\n minPt: "<<minPt
272 <<
"\n deltaR:"<<deltaR
273 <<
"\n deltaZ:"<<deltaZ
274 <<
"\n region_dEta:"<<region_dEta
275 <<
"\n region_dPhi:"<<region_dPhi
276 <<
"\n on demand parameter: "<<
static_cast<int>(theOnDemand);
RectangularEtaPhiTrackingRegion * region(const reco::TrackRef &) const
define tracking region
double p() const
momentum vector magnitude
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MuonTrackingRegionBuilder(const edm::ParameterSet &, edm::ConsumesCollector &)
constructor
T getParameter(std::string const &) const
double z0() const
z coordinate
double thetaError() const
virtual void setEvent(const edm::Event &)
pass the Event to the algo at each event
Sin< T >::type sin(const T &t)
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
tuple MeasurementTrackerEvent
std::vector< Vertex > VertexCollection
collection of Vertex objects
void build(const edm::ParameterSet &, edm::ConsumesCollector &)
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
GlobalVector momentum() const
FTS const & trackStateAtPCA() const
double deltaR(double eta1, double eta2, double phi1, double phi2)
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
void init(const MuonServiceProxy *)
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
double y0() const
y coordinate
PerigeeTrajectoryError ftsToPerigeeError(const FTS &originalFTS)
double x0() const
x coordinate