16 #include "CLHEP/Vector/LorentzVector.h"
28 static const InterfaceID IID_IConversionPostSelector(
"InDet::ConversionPostSelector", 1, 0);
31 const std::string&
name,
34 declareInterface<ConversionPostSelector>(
this);
38 return IID_IConversionPostSelector;
42 return StatusCode::SUCCESS;
46 return StatusCode::SUCCESS;
50 std::vector<Amg::Vector3D>& trkL)
const{
54 double maxChi2 = 1000.;
55 double invMassCut = 1000.;
56 double fitMomentum = 0.;
79 if (
vertex->nTrackParticles() != 2) {
80 ATH_MSG_DEBUG(
"Incorrect number of tracks used in conversion fit.");
84 float reducedChi2 =
vertex->chiSquared()/
vertex->numberDoF();
85 if (reducedChi2 > maxChi2) pass =
false;
86 if (reducedChi2 > maxChi2) pass =
false;
89 double vtxR =
vertex->position().perp();
90 if(vtxR <
radius) pass =
false;
93 std::vector< Trk::VxTrackAtVertex >& trkAtVx =
vertex->vxTrackAtVertex();
94 if (trkAtVx.size() != 2 ||
95 !trkAtVx[0].perigeeAtVertex() ||
96 !trkAtVx[1].perigeeAtVertex())
98 ATH_MSG_DEBUG(
"VxTrackAtVertex or perigeeAtVertex not available");
108 double ee = std::sqrt(
m2 + perigee1.
momentum().mag2()) + std::sqrt(
m2 + perigee2.
momentum().mag2());
112 double pt1 = perigee1.
pT();
double pt2 = perigee2.
pT();
115 if (std::fabs(inv_mass) > invMassCut) pass =
false;
116 if (photonP < fitMomentum) pass =
false;
119 std::vector<Amg::Vector3D>::const_iterator ipb=trkL.begin();
120 std::vector<Amg::Vector3D>::const_iterator ipbe=trkL.end();
121 for(; ipb!=ipbe;++ipb){
122 double tmpfR = (*ipb).perp();
123 if(tmpfR<fR) fR = tmpfR;
127 double PhiVtxTrk =
vertex->position().phi() - perigee1.parameters()[
Trk::phi0];
128 if (PhiVtxTrk < -
M_PI) PhiVtxTrk +=
twopi;
129 if (PhiVtxTrk >
M_PI) PhiVtxTrk -=
twopi;
134 ATH_MSG_DEBUG(
"Decorating vertex with values used in post selector");
146 std::vector<Amg::Vector3D>& trkL,
151 bool isLambda =
false;
152 bool isLambdaBar =
false;
156 double maxChi2 = 1000.;
157 double fitMomentum = 0.;
178 if (
vertex->nTrackParticles() != 2) {
179 ATH_MSG_DEBUG(
"Incorrect number of tracks used in conversion fit.");
182 float reducedChi2 =
vertex->chiSquared()/
vertex->numberDoF();
183 if (reducedChi2 > maxChi2) pass =
false;
186 double vtxR =
vertex->position().perp();
187 if(vtxR <
radius) pass =
false;
190 std::vector< Trk::VxTrackAtVertex >& trkAtVx =
vertex->vxTrackAtVertex();
191 if (trkAtVx.size() != 2 ||
192 !trkAtVx[0].perigeeAtVertex() ||
193 !trkAtVx[1].perigeeAtVertex())
195 ATH_MSG_DEBUG(
"VxTrackAtVertex or perigeeAtVertex not available");
201 double pt1 = perigee1.
pT();
double pt2 = perigee2.
pT();
205 std::vector<Amg::Vector3D>::const_iterator ipb=trkL.begin();
206 std::vector<Amg::Vector3D>::const_iterator ipbe=trkL.end();
207 for(; ipb!=ipbe;++ipb){
208 double tmpfR = (*ipb).perp();
209 if(tmpfR<fR) fR = tmpfR;
214 CLHEP::HepLorentzVector momentumK0 =
fourP(perigee1,perigee2,
m_massK0,
false);
215 double inv_massK0 = momentumK0.m();
218 double inv_massL = momentumL.m();
221 double inv_massLb = momentumLb.m();
223 if (!isLambdaBar && !isLambda && !isK0) pass =
false;
225 if(isK0 && isLambda && !isLambdaBar) {
momentum = momentumK0; kind = 110;}
226 if(isK0 && isLambdaBar && !isLambda) {
momentum = momentumK0; kind = 101;}
227 if(isK0 && !isLambda && !isLambdaBar) {
momentum = momentumK0; kind = 100;}
228 if(!isK0 && isLambda && !isLambdaBar) {
momentum = momentumL; kind = 10;}
229 if(!isK0 && isLambdaBar && !isLambda) {
momentum = momentumLb; kind = 1;}
230 if(!isK0 && isLambda && isLambdaBar) {
momentum = momentumL; kind = 11;}
232 if (particleP < fitMomentum) pass =
false;
238 CLHEP::HepLorentzVector
246 double mp1 = 0.;
double mp2 = 0.;
269 double ee = std::sqrt(mp1 + per1.
momentum().mag2()) + std::sqrt(mp2 + per2.
momentum().mag2());
280 float deltaPhiVtxTrk)
283 accMass(
vertex) = inv_mass;
289 accMinRfirstHit(
vertex) = fR;
291 accDeltaPhiVtxTrk(
vertex) = deltaPhiVtxTrk;