CMS 3D CMS Logo

Public Member Functions | Public Attributes

CandidateSelector Class Reference

#include <CandidateSelector.h>

List of all members.

Public Member Functions

 CandidateSelector (const edm::ParameterSet &iConfig)
bool isSelected (susybsm::HSCParticle &candidate)

Public Attributes

bool isEcal
bool isMuon
bool isMuonGB
bool isMuonSTA
bool isMuonTK
bool isRpc
bool isTrack
float maxBetaEcal
float maxBetaRpc
float maxMuTimeCombinedBeta
float maxMuTimeCscBeta
float maxMuTimeDtBeta
float minDedx
float minMuonP
float minMuonPt
float minMuTimeCombinedNdof
float minMuTimeCscNdof
float minMuTimeDtNdof
int minTrackHits
float minTrackP
float minTrackPt

Detailed Description

Definition at line 18 of file CandidateSelector.h.


Constructor & Destructor Documentation

CandidateSelector::CandidateSelector ( const edm::ParameterSet iConfig)

Definition at line 10 of file CandidateSelector.cc.

References edm::ParameterSet::getParameter(), reco::isMuon(), align_cfg::minTrackP, and align_cfg::minTrackPt.

                                                                  {
   isTrack               = iConfig.getParameter<bool>   ("onlyConsiderTrack");
   isMuon                = iConfig.getParameter<bool>   ("onlyConsiderMuon");
   isMuonSTA             = iConfig.getParameter<bool>   ("onlyConsiderMuonSTA"); 
   isMuonGB              = iConfig.getParameter<bool>   ("onlyConsiderMuonGB");
   isMuonTK              = iConfig.getParameter<bool>   ("onlyConsiderMuonTK");
   isRpc                 = iConfig.getParameter<bool>   ("onlyConsiderRpc");
   isEcal                = iConfig.getParameter<bool>   ("onlyConsiderEcal");

   minTrackHits          = iConfig.getParameter<int>    ("minTrackHits");
   minTrackP             = iConfig.getParameter<double> ("minTrackP");
   minTrackPt            = iConfig.getParameter<double> ("minTrackPt");

   minDedx               = iConfig.getParameter<double> ("minDedx");

   minMuonP              = iConfig.getParameter<double> ("minMuonP");
   minMuonPt             = iConfig.getParameter<double> ("minMuonPt");

   maxMuTimeDtBeta       = iConfig.getParameter<double> ("maxMuTimeDtBeta");
   minMuTimeDtNdof       = iConfig.getParameter<double> ("minMuTimeDtNdof");
   maxMuTimeCscBeta      = iConfig.getParameter<double> ("maxMuTimeCscBeta");
   minMuTimeCscNdof      = iConfig.getParameter<double> ("minMuTimeCscNdof");
   maxMuTimeCombinedBeta = iConfig.getParameter<double> ("maxMuTimeCombinedBeta");
   minMuTimeCombinedNdof = iConfig.getParameter<double> ("minMuTimeCombinedNdof");

   maxBetaRpc            = iConfig.getParameter<double> ("maxBetaRpc");
   maxBetaEcal           = iConfig.getParameter<double> ("maxBetaEcal");
}

Member Function Documentation

bool CandidateSelector::isSelected ( susybsm::HSCParticle candidate)

Definition at line 40 of file CandidateSelector.cc.

References susybsm::RPCBetaMeasurement::beta, susybsm::HSCParticle::hasCaloInfo(), susybsm::HSCParticle::hasMuonRef(), susybsm::HSCParticle::hasRpcInfo(), susybsm::HSCParticle::hasTrackRef(), reco::isMuon(), edm::Ref< C, T, F >::isNull(), align_cfg::minTrackP, align_cfg::minTrackPt, susybsm::HSCParticle::muonRef(), susybsm::HSCParticle::rpc(), and susybsm::HSCParticle::trackRef().

{
   if(isTrack   && !candidate.hasTrackRef()){return false;}
   if(isMuon    && !candidate.hasMuonRef() ){return false;}
   if(isMuonSTA && (!candidate.hasMuonRef() || candidate.muonRef()->standAloneMuon().isNull()) ){return false;}
   if(isMuonGB  && (!candidate.hasMuonRef() || candidate.muonRef()->combinedMuon  ().isNull()) ){return false;}
   if(isMuonTK  && (!candidate.hasMuonRef() || candidate.muonRef()->innerTrack    ().isNull()) ){return false;}
   if(isRpc     && !candidate.hasRpcInfo() ){return false;}
   if(isEcal    && !candidate.hasCaloInfo()){return false;}

   if(candidate.hasTrackRef()){
      if(candidate.trackRef()->found() < minTrackHits){return false;}
      if(candidate.trackRef()->p()     < minTrackP   ){return false;}
      if(candidate.trackRef()->pt()    < minTrackPt  ){return false;}

//      Need to be implemented using external dE/dx object
//      if(candidate.hasDedxEstim1()   && minDedxEstimator1>=0     && candidate.dedxEstimator1    ().dEdx()<minDedxEstimator1)    {return false;}
//      if(candidate.hasDedxDiscrim1() && minDedxDiscriminator1>=0 && candidate.dedxDiscriminator1().dEdx()<minDedxDiscriminator1){return false;}
   }

   if(candidate.hasMuonRef()){
      if(candidate.muonRef()->p()     < minMuonP   ){return false;}
      if(candidate.muonRef()->pt()    < minMuonPt  ){return false;}

//      Need to be implemented using external timing object
//      if(maxMuTimeDtBeta      >=0 && 1.0/candidate.muonTimeDt().inverseBeta()       > maxMuTimeDtBeta      ){return false;}
//      if(minMuTimeDtNdof      >=0 && 1.0/candidate.muonTimeDt().nDof()              < minMuTimeDtNdof      ){return false;}
//      if(maxMuTimeCscBeta     >=0 && 1.0/candidate.muonTimeCsc().inverseBeta()      > maxMuTimeCscBeta     ){return false;}
//      if(minMuTimeCscNdof     >=0 && 1.0/candidate.muonTimeCsc().nDof()             < minMuTimeCscNdof     ){return false;}
//      if(maxMuTimeCombinedBeta>=0 && 1.0/candidate.muonTimeCombined().inverseBeta() > maxMuTimeCombinedBeta){return false;}
//      if(minMuTimeCombinedNdof>=0 && 1.0/candidate.muonTimeCombined().nDof()        < minMuTimeCombinedNdof){return false;}
   }

   if(candidate.hasRpcInfo()  && maxBetaRpc>=0  && candidate.rpc ().beta     > maxBetaRpc ){return false;}

//      Need to be implemented using external dE/dx object
//   if(candidate.hasCaloInfo() && maxBetaEcal>=0 && candidate.calo().ecalBeta > maxBetaEcal){return false;}

   return true;
}

Member Data Documentation

Definition at line 29 of file CandidateSelector.h.

Definition at line 24 of file CandidateSelector.h.

Definition at line 26 of file CandidateSelector.h.

Definition at line 25 of file CandidateSelector.h.

Definition at line 27 of file CandidateSelector.h.

Definition at line 28 of file CandidateSelector.h.

Definition at line 23 of file CandidateSelector.h.

Definition at line 47 of file CandidateSelector.h.

Definition at line 46 of file CandidateSelector.h.

Definition at line 43 of file CandidateSelector.h.

Definition at line 41 of file CandidateSelector.h.

Definition at line 39 of file CandidateSelector.h.

Definition at line 34 of file CandidateSelector.h.

Definition at line 36 of file CandidateSelector.h.

Definition at line 37 of file CandidateSelector.h.

Definition at line 44 of file CandidateSelector.h.

Definition at line 42 of file CandidateSelector.h.

Definition at line 40 of file CandidateSelector.h.

Definition at line 31 of file CandidateSelector.h.

Definition at line 32 of file CandidateSelector.h.

Definition at line 33 of file CandidateSelector.h.