CMS 3D CMS Logo

InvariantMassAlgorithm Class Reference

#include <RecoTauTag/InvariantMass/interface/InvariantMassAlgorithm.h>

List of all members.

Public Member Functions

float getMinimumClusterDR (edm::Event &theEvent, const edm::EventSetup &theEventSetup, const reco::IsolatedTauTagInfoRef &tauRef, const math::XYZVector &cluster_3vec)
 InvariantMassAlgorithm ()
 InvariantMassAlgorithm (const edm::ParameterSet &parameters)
std::pair< double,
reco::TauMassTagInfo
tag (edm::Event &theEvent, const edm::EventSetup &theEventSetup, const reco::IsolatedTauTagInfoRef &tauRef, const edm::Handle< reco::BasicClusterCollection > &clus_handle)
 ~InvariantMassAlgorithm ()

Private Attributes

double cluster_jet_matching_cone
double cluster_track_matching_cone
double inv_mass_cut
double leading_trk_pt
double matching_cone
double signal_cone
TrackDetectorAssociatortrackAssociator_
TrackAssociatorParameters trackAssociatorParameters_


Detailed Description

Definition at line 26 of file InvariantMassAlgorithm.h.


Constructor & Destructor Documentation

InvariantMassAlgorithm::InvariantMassAlgorithm ( const edm::ParameterSet parameters  ) 

Definition at line 23 of file InvariantMassAlgorithm.cc.

References cluster_jet_matching_cone, cluster_track_matching_cone, edm::ParameterSet::getParameter(), inv_mass_cut, leading_trk_pt, TrackAssociatorParameters::loadParameters(), matching_cone, signal_cone, trackAssociator_, trackAssociatorParameters_, and TrackDetectorAssociator::useDefaultPropagator().

00024 {
00025   matching_cone               = parameters.getParameter<double>("MatchingCone");
00026   leading_trk_pt              = parameters.getParameter<double>("LeadingTrackPt");
00027   signal_cone                 = parameters.getParameter<double>("SignalCone");
00028   cluster_jet_matching_cone   = parameters.getParameter<double>("ClusterSelectionCone");
00029   cluster_track_matching_cone = parameters.getParameter<double>("ClusterTrackMatchingCone");
00030   inv_mass_cut                = parameters.getParameter<double>("InvariantMassCutoff");
00031 
00032 
00033 // TrackAssociator parameters
00034    edm::ParameterSet tk_ass_pset = parameters.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
00035    trackAssociatorParameters_.loadParameters( tk_ass_pset );
00036 
00037    trackAssociator_ = new TrackDetectorAssociator();
00038    trackAssociator_->useDefaultPropagator();
00039 }

InvariantMassAlgorithm::InvariantMassAlgorithm (  ) 

Definition at line 11 of file InvariantMassAlgorithm.cc.

References cluster_jet_matching_cone, cluster_track_matching_cone, inv_mass_cut, leading_trk_pt, matching_cone, and signal_cone.

00012 {
00013   matching_cone               = 0.1; // check with simone
00014   leading_trk_pt              = 1.0; // check with simone
00015   signal_cone                 = 0.07;// check with simone
00016   cluster_jet_matching_cone   = 0.4;
00017   cluster_track_matching_cone = 0.08;
00018   inv_mass_cut                = 2.5;
00019 }

InvariantMassAlgorithm::~InvariantMassAlgorithm (  ) 

Definition at line 43 of file InvariantMassAlgorithm.cc.

References trackAssociator_.

00043                                                 {
00044   if(trackAssociator_) delete trackAssociator_;
00045 }


Member Function Documentation

float InvariantMassAlgorithm::getMinimumClusterDR ( edm::Event theEvent,
const edm::EventSetup theEventSetup,
const reco::IsolatedTauTagInfoRef &  tauRef,
const math::XYZVector cluster_3vec 
)

Definition at line 86 of file InvariantMassAlgorithm.cc.

References TrackDetectorAssociator::associate(), edm::RefVector< C, T, F >::begin(), cluster_jet_matching_cone, deltaR2(), TrackAssociatorParameters::dREcal, edm::RefVector< C, T, F >::end(), TrackDetectorAssociator::getFreeTrajectoryState(), info, it, metsig::jet, reco::Particle::px(), reco::Particle::py(), reco::Particle::pz(), trackAssociator_, trackAssociatorParameters_, tracks, TrackDetMatchInfo::trkGlobPosAtEcal, TrackAssociatorParameters::useEcal, TrackAssociatorParameters::useHcal, TrackAssociatorParameters::useHO, and TrackAssociatorParameters::useMuon.

Referenced by tag().

00090 {
00091 
00092   trackAssociatorParameters_.useEcal = true;
00093   trackAssociatorParameters_.useHcal = false;
00094   trackAssociatorParameters_.useHO   = false;
00095   trackAssociatorParameters_.useMuon = false;
00096   trackAssociatorParameters_.dREcal  = 0.03;
00097 
00098   const TrackRefVector tracks = tauRef->allTracks();
00099   const Jet & jet = *(tauRef->jet()); 
00100   math::XYZVector jet3Vec(jet.px(),jet.py(),jet.pz());   
00101   float min_dR = 999.9; 
00102   float deltaR1 = ROOT::Math::VectorUtil::DeltaR(cluster_3vec, jet3Vec);
00103   if (deltaR1 > cluster_jet_matching_cone) return -1.0;
00104 
00105   for (edm::RefVector<reco::TrackCollection>::const_iterator it  = tracks.begin();
00106                                                              it != tracks.end(); it++) 
00107   {    
00108     TrackDetMatchInfo info;
00109     info = trackAssociator_->associate(theEvent, theEventSetup,
00110                                      trackAssociator_->getFreeTrajectoryState(theEventSetup, (*(*it))), 
00111                                      trackAssociatorParameters_);
00112     math::XYZVector track3Vec(info.trkGlobPosAtEcal.x(),
00113                               info.trkGlobPosAtEcal.y(),
00114                               info.trkGlobPosAtEcal.z());
00115 
00116     float deltaR2 = ROOT::Math::VectorUtil::DeltaR(cluster_3vec, track3Vec);
00117     if (deltaR2 < min_dR) min_dR = deltaR2;        
00118   }
00119   return min_dR;
00120 }

pair< double, reco::TauMassTagInfo > InvariantMassAlgorithm::tag ( edm::Event theEvent,
const edm::EventSetup theEventSetup,
const reco::IsolatedTauTagInfoRef &  tauRef,
const edm::Handle< reco::BasicClusterCollection > &  clus_handle 
)

Definition at line 49 of file InvariantMassAlgorithm.cc.

References cluster_track_matching_cone, GenMuonPlsPt100GeV_cfg::cout, reco::TauMassTagInfo::discriminator(), lat::endl(), getMinimumClusterDR(), inv_mass_cut, leading_trk_pt, matching_cone, reco::TauMassTagInfo::setIsolatedTauTag(), signal_cone, funct::sin(), reco::TauMassTagInfo::storeClusterTrackCollection(), x, y, and z.

Referenced by InvariantMass< T1, T2 >::produce().

00053 {
00054 
00055   TauMassTagInfo resultExtended;
00056   resultExtended.setIsolatedTauTag(tauRef);
00057 
00058   double discriminator = tauRef->discriminator();
00059   if (discriminator > 0.0) {
00060 
00061     int nSel = 0;
00062     for (size_t ic = 0; ic < clus_handle->size(); ic++) {
00063       math::XYZVector cluster3Vec((*clus_handle)[ic].x(),(*clus_handle)[ic].y(),(*clus_handle)[ic].z());
00064       BasicClusterRef cluster(clus_handle, ic);
00065       float et = (*clus_handle)[ic].energy() * sin(cluster3Vec.theta());       
00066       if ( (et < 0.04) || (et > 300.0) ) continue;    
00067       float delR = getMinimumClusterDR(theEvent, theEventSetup, tauRef, cluster3Vec);
00068       if (delR != -1.0) {
00069         nSel++;
00070         resultExtended.storeClusterTrackCollection(cluster, delR);
00071       }
00072     }
00073     if (0) cout << " Total Number of Clusters " << clus_handle->size() << " " << nSel << endl;
00074     
00075     discriminator = resultExtended.discriminator(matching_cone,
00076                                                  leading_trk_pt,
00077                                                  signal_cone,
00078                                                  cluster_track_matching_cone,
00079                                                  inv_mass_cut); 
00080   }
00081   return make_pair(discriminator, resultExtended); 
00082 }


Member Data Documentation

double InvariantMassAlgorithm::cluster_jet_matching_cone [private]

Definition at line 50 of file InvariantMassAlgorithm.h.

Referenced by getMinimumClusterDR(), and InvariantMassAlgorithm().

double InvariantMassAlgorithm::cluster_track_matching_cone [private]

Definition at line 51 of file InvariantMassAlgorithm.h.

Referenced by InvariantMassAlgorithm(), and tag().

double InvariantMassAlgorithm::inv_mass_cut [private]

Definition at line 52 of file InvariantMassAlgorithm.h.

Referenced by InvariantMassAlgorithm(), and tag().

double InvariantMassAlgorithm::leading_trk_pt [private]

Definition at line 48 of file InvariantMassAlgorithm.h.

Referenced by InvariantMassAlgorithm(), and tag().

double InvariantMassAlgorithm::matching_cone [private]

Definition at line 47 of file InvariantMassAlgorithm.h.

Referenced by InvariantMassAlgorithm(), and tag().

double InvariantMassAlgorithm::signal_cone [private]

Definition at line 49 of file InvariantMassAlgorithm.h.

Referenced by InvariantMassAlgorithm(), and tag().

TrackDetectorAssociator* InvariantMassAlgorithm::trackAssociator_ [private]

Definition at line 54 of file InvariantMassAlgorithm.h.

Referenced by getMinimumClusterDR(), InvariantMassAlgorithm(), and ~InvariantMassAlgorithm().

TrackAssociatorParameters InvariantMassAlgorithm::trackAssociatorParameters_ [private]

Definition at line 55 of file InvariantMassAlgorithm.h.

Referenced by getMinimumClusterDR(), and InvariantMassAlgorithm().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:53 2009 for CMSSW by  doxygen 1.5.4