CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloRecoTauDiscriminationByInvMass.cc
Go to the documentation of this file.
3 
4 /* class CaloRecoTauDiscriminationByInvMass
5  * created : September 23 2010,
6  * contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
7  * based on H+ tau ID by Lauri Wendland
8  */
9 
11 #include "TLorentzVector.h"
12 
13 using namespace reco;
14 using namespace std;
15 
17  public:
19  const edm::ParameterSet& iConfig)
21  invMassMin = iConfig.getParameter<double>("invMassMin");
22  invMassMax = iConfig.getParameter<double>("invMassMax");
23  chargedPionMass = 0.139;
24  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
25  }
26 
28 
29  double discriminate(const reco::CaloTauRef&);
30 
31  private:
32  double threeProngInvMass(const CaloTauRef&);
34  double invMassMin,invMassMax;
36 };
37 
39 
40  double invMass = threeProngInvMass(tau);
41  if(booleanOutput) return (
42  invMass > invMassMin && invMass < invMassMax ? 1. : 0. );
43  return invMass;
44 }
45 
47  const CaloTauRef& tau){
48  TLorentzVector sum;
49  reco::TrackRefVector signalTracks = tau->signalTracks();
50  for(size_t i = 0; i < signalTracks.size(); ++i){
51  TLorentzVector p4;
52  p4.SetXYZM(signalTracks[i]->px(),
53  signalTracks[i]->py(),
54  signalTracks[i]->pz(),
55  chargedPionMass);
56  sum += p4;
57  }
58  return sum.M();
59 }
60 
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
double p4[4]
Definition: TauolaWrapper.h:92
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
CaloRecoTauDiscriminationByInvMass(const edm::ParameterSet &iConfig)