ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/PollackPrograms/src/TCPhoton.cc
(Generate patch)

Comparing UserCode/PollackPrograms/src/TCPhoton.cc (file contents):
Revision 1.1 by bpollack, Tue Jul 24 20:24:58 2012 UTC vs.
Revision 1.2 by bpollack, Wed Feb 20 21:39:43 2013 UTC

# Line 1 | Line 1
1   #include "TCPhoton.h"
2   #include <iostream>
3 #include <map>
4 #include <utility>
5 #include <string>
3  
4 + TCPhoton::TCPhoton() { }
5  
6 < TCPhoton::TCPhoton() {
9 < }
10 <
11 < TCPhoton::~TCPhoton() {
12 < }
13 <
6 > TCPhoton::~TCPhoton() { }
7  
8   // "get" methods -------------------------------------
16 using namespace std;
17
18 map<string, float> TCPhoton::PhotonMap() {
19  return _PhotonTrueMap;
20 }
9  
10 + float TCPhoton::NormChi2() const { return _normChi2; }
11 + float TCPhoton::HadOverEm() const { return _hadOverEm; }
12 + float TCPhoton::SigmaIEtaIEta() const { return _sigmaIEtaIEta; }
13 + float TCPhoton::R9() const { return _r9; }
14 + float TCPhoton::SigmaIPhiIPhi() const { return _sigmaIPhiIPhi; }
15 + float TCPhoton::E2OverE9() const { return _e2OverE9; }
16 + bool  TCPhoton::TrackVeto() const { return _trackVeto; }
17 +
18 + float TCPhoton::SCDPhi() const { return _SCdPhi; }
19 + float TCPhoton::SCDEta() const { return _SCdEta; }
20 + float TCPhoton::SCEnergy() const { return _SCenergy; }
21 + float TCPhoton::SCEta() const { return _SCeta; }
22 + float TCPhoton::SCPhi() const { return _SCphi; }
23  
24 < TVector3 TCPhoton::Vtx() const {
24 <   return _vtx;
25 < }
24 > bool  TCPhoton::ConversionVeto() const { return _convVeto; }
25  
27 int TCPhoton::Charge() const {
28   return _charge;
29 }
30
31 vector<float> TCPhoton::TrkIsoVtxDR03() const {
32   return _trkIsoVtxDR03;
33 }
34
35 vector<float> TCPhoton::TrkIsoVtxDR04() const {
36   return _trkIsoVtxDR04;
37 }
26   // "set" methods ---------------------------------------------
27  
28 < void TCPhoton::LoadMap(vector<string> svec){
29 <  //Strings take a lot of memory, so call this to load the cut names into the muon class
30 <  //when you start running your analyzer, otherwise MuonMap will return an empty map
31 <    for (unsigned int i=0; i<_PhotonIndexMap.size(); i++)
32 <    {
33 <    _PhotonTrueMap[svec[i]] = _PhotonIndexMap[i];
34 <    }
35 < }
36 <
37 < void TCPhoton::SetMap(string s, float v, vector<string>* svec){
38 <  //set the index map internally and the name map externally, for memory saving
39 <  for (unsigned int i = 0; i<svec->size(); i++){
40 <    if (s.compare(svec->at(i)) ==0){
41 <      _PhotonIndexMap[i] = v;
42 <      return;
55 <    }
56 <  }
57 <  svec->push_back(s);
58 <  _PhotonIndexMap[svec->size()-1] = v;
59 < }
60 <
61 <
62 < void TCPhoton::SetVtx(float vx, float vy, float vz) {
63 <  TVector3 v3(vx, vy, vz);
64 <  _vtx = v3;
65 < }
66 <
67 < void TCPhoton::SetCharge(int c){
68 <  _charge = c;
69 < }
70 <
71 < void TCPhoton::SetTRKIsoVtxDR03(float t){
72 <    _trkIsoVtxDR03.push_back(t);
73 < }
74 < void TCPhoton::SetTRKIsoVtxDR04(float t){
75 <    _trkIsoVtxDR04.push_back(t);
76 < }
28 > void TCPhoton::SetNormChi2(float c){ _normChi2 = c; }
29 > void TCPhoton::SetHadOverEm(float h){ _hadOverEm = h; }
30 > void TCPhoton::SetSigmaIEtaIEta(float s){ _sigmaIEtaIEta = s; }
31 > void TCPhoton::SetSigmaIPhiIPhi(float s) { _sigmaIPhiIPhi = s; }
32 > void TCPhoton::SetR9(float r){ _r9 = r; }
33 > void TCPhoton::SetE2OverE9(float e) { _e2OverE9 = e; }
34 > void TCPhoton::SetTrackVeto(bool t) { _trackVeto = t; }
35 >
36 > void TCPhoton::SetSCDPhi(float d){ _SCdPhi = d; }
37 > void TCPhoton::SetSCDEta(float d){ _SCdEta = d; }
38 > void TCPhoton::SetSCEta(float n) { _SCeta = n; }
39 > void TCPhoton::SetSCPhi(float p) { _SCphi = p; }
40 > void TCPhoton::SetSCEnergy(float e) { _SCenergy = e; }
41 >
42 > void TCPhoton::SetConversionVeto(bool v) { _convVeto = v; }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines