8 #include "StMuL3Filter.h"
10 #include "StMuException.hh"
11 #include "StEvent/StTrack.h"
12 #include "StEvent/StTrackGeometry.h"
13 #include "StEvent/StTrackDetectorInfo.h"
14 #include "StEvent/StContainers.h"
15 #include "StEvent/StDedxPidTraits.h"
18 #include "StarClassLibrary/BetheBloch.h"
22 bool
StMuL3Filter::accept( const
StEvent* e) { cout <<
"StMuL3Filter::accept( const StEvent* e) not overwritten, returning true" << endl;
return true;}
26 bool StMuL3Filter::accept(
const StV0MuDst* v) { cout <<
"StMuL3Filter::accept(const StV0MuDst* v) not overwritten, returning true" << endl;
return true;}
27 bool StMuL3Filter::accept(
const StXiMuDst* x) { cout <<
"StMuL3Filter::accept(const StXiMuDst* x) not overwritten, returning true" << endl;
return true;}
31 StMuL3Filter::StMuL3Filter() {
33 cerr <<
"StMuL3Filter::StMuL3Filter(): called. Next BetheBloch instance is made." << endl;
35 cerr <<
"StMuL3Filter::StMuL3Filter(): did you see the BetheBloch warning?" << endl;
38 StMuL3Filter::~StMuL3Filter() {
45 int nHitsCutHighP = 10;
49 int nHitsCutLowP = 15;
50 int chargeForLowP = -1;
51 float dEdxMassCutHigh = 0.939;
52 float dEdxFractionCutHigh = 0.6;
53 float dEdxMassCutLow = 0.494;
54 float dEdxFractionCutLow = 1.1;
59 if (track->geometry()->momentum().magnitude() > pCutHigh
60 && track->detectorInfo()->numberOfPoints() >= nHitsCutHighP)
65 if (track->detectorInfo()->numberOfPoints() >= nHitsCutLowP
66 && track->geometry()->momentum().magnitude() > pCutLow) {
74 else if (track->geometry()->charge() == chargeForLowP)
79 float p = track->geometry()->momentum().magnitude();
80 float dedxHigh = dEdxFractionCutHigh * mBB->Sirrf(p/dEdxMassCutHigh);
81 float dedxLow = dEdxFractionCutLow * mBB->Sirrf(p/dEdxMassCutLow);
85 const StSPtrVecTrackPidTraits& traits = track->pidTraits();
87 for (
unsigned int itrait = 0; itrait < traits.size(); itrait++){
89 if (traits[itrait]->detector() == kTpcId) {
92 if (dedxPidTr && dedxPidTr->method() == kTruncatedMeanId) {
94 dedx = 2 * dedxPidTr->mean();
98 if (dedx > dedxHigh && dedx > dedxLow)
102 iret = chargeOK * dedxOK;
bool accept(const StEvent *)
abstract cut function, has to be overwritten by derived class