ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/Tools/tools.h
Revision: 1.2
Committed: Sun Aug 29 22:52:28 2010 UTC (14 years, 8 months ago) by fgolf
Content type: text/plain
Branch: MAIN
CVS Tags: ss2010_10_06, fkwsynch3pbv2, fkw_3pb_samesign_synch
Changes since 1.1: +2 -0 lines
Log Message:
added function to calculate deltaR between LorentzVectors

File Contents

# User Rev Content
1 fgolf 1.1 // -*- C++ -*-
2    
3     #ifndef TOOLS_H
4     #define TOOLS_H
5    
6     #include "TH1F.h"
7     #include "TH2F.h"
8     #include "TH3F.h"
9     #include "TVector3.h"
10     #include <algorithm>
11     #include <vector>
12     #include <set>
13     #include "Math/VectorUtil.h"
14    
15     using std::vector;
16    
17     struct DorkyEventIdentifier {
18     // this is a workaround for not having unique event id's in MC
19     DorkyEventIdentifier (class CMS2 &cms2);
20     DorkyEventIdentifier (unsigned long int r, unsigned long int e, unsigned long int l);
21     unsigned long int run, event, lumi_section;
22     float trks_d0;
23     float trks_pt, trks_eta, trks_phi;
24     bool operator < (const DorkyEventIdentifier &) const;
25     bool operator == (const DorkyEventIdentifier &) const;
26     };
27    
28     extern std::set<DorkyEventIdentifier> already_seen;
29    
30     bool is_duplicate (const DorkyEventIdentifier &id);
31    
32     void saveHist(const char* filename, const char* pat="*");
33    
34     extern class TDirectory *histo_directory;
35 fgolf 1.2
36     double dRbetweenVectors(const LorentzVector & vec1, const LorentzVector & vec2 );
37 fgolf 1.1 #endif