CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
IsolatedTracksNxN.h
Go to the documentation of this file.
1 #ifndef CalibrationIsolatedParticlesIsolatedTracksNxN_h
2 #define CalibrationIsolatedParticlesIsolatedTracksNxN_h
3 
4 // system include files
5 #include <memory>
6 #include <cmath>
7 #include <string>
8 #include <map>
9 #include <vector>
10 
11 // user include files
12 #include <Math/GenVector/VectorUtil.h>
13 
20 
22 
23 // TFile Service
26 
31 
32 // muons and tracks
36 // Vertices
40 // Calorimeters
47 
48 //L1 objects
55 
56 // Jets in the event
60 
61 // SimHit
63 //simtrack
68 
69 // track associator
73 // ecal / hcal
80 
82 
83 //L1 trigger Menus etc
89 
97 
103 
104 // root objects
105 #include "TROOT.h"
106 #include "TSystem.h"
107 #include "TFile.h"
108 #include "TH1F.h"
109 #include "TH2F.h"
110 #include "TProfile.h"
111 #include "TDirectory.h"
112 #include "TTree.h"
113 
115 
116 public:
117  explicit IsolatedTracksNxN(const edm::ParameterSet&);
119 
120 private:
121  //void beginJob(const edm::EventSetup&) ;
122  void beginJob() ;
123  void analyze(const edm::Event&, const edm::EventSetup&);
124  void endJob() ;
125 
126  void printTrack(const reco::Track* pTrack);
127 
128  void BookHistograms();
129 
130  double DeltaPhi(double v1, double v2);
131  double DeltaR(double eta1, double phi1, double eta2, double phi2);
132 
133 
134  void clearTreeVectors();
135 
136 private:
137 
139 
141  static const size_t nL1BitsMax=128;
142 
143  // map of trig bit, algo name and num events passed
144  std::map< std::pair<unsigned int,std::string>, int> l1AlgoMap;
146  unsigned int m_numberDaqPartitions;
149  std::vector<unsigned int> m_triggerMaskAlgoTrig;
150 
161 
165 
167 
168  double genPartPBins[16], genPartEtaBins[4];
169 
170  static const size_t NPBins = 15;
171  static const size_t NEtaBins = 3;
172 
177 
180 
181  TH1F *h_nTracks;
182 
185 
188 
191 
192 
193 
194  TTree* tree;
195 
197 
199  std::vector<std::string> *t_L1AlgoNames;
200  std::vector<int> *t_L1PreScale;
201  int t_L1Decision[128];
202 
203  std::vector<double> *t_PVx, *t_PVy, *t_PVz, *t_PVTracksSumPt;
206  std::vector<int> *t_PVNTracksHP, *t_PVNTracksHPWt;
207 
208  std::vector<double> *t_L1CenJetPt, *t_L1CenJetEta, *t_L1CenJetPhi;
209  std::vector<double> *t_L1FwdJetPt, *t_L1FwdJetEta, *t_L1FwdJetPhi;
210  std::vector<double> *t_L1TauJetPt, *t_L1TauJetEta, *t_L1TauJetPhi;
211  std::vector<double> *t_L1MuonPt, *t_L1MuonEta, *t_L1MuonPhi;
212  std::vector<double> *t_L1IsoEMPt, *t_L1IsoEMEta, *t_L1IsoEMPhi;
214  std::vector<double> *t_L1METPt, *t_L1METEta, *t_L1METPhi;
215 
216  std::vector<double> *t_jetPt, *t_jetEta, *t_jetPhi;
217  std::vector<double> *t_nTrksJetCalo, *t_nTrksJetVtx;
218 
220  std::vector<double> *t_trackPtAll;
222 
223  std::vector<double> *t_trackP, *t_trackPt, *t_trackEta, *t_trackPhi;
225  std::vector<double> *t_trackDxy, *t_trackDxyBS, *t_trackDz, *t_trackDzBS;
226  std::vector<double> *t_trackDxyPV, *t_trackDzPV;
227  std::vector<double> *t_trackChiSq;
228  std::vector<int> *t_trackPVIdx;
229 
230  std::vector<int> *t_NLayersCrossed, *t_trackNOuterHits;
231  std::vector<int> *t_trackHitsTOB, *t_trackHitsTEC;
236  std::vector<double> *t_trackOutPosOutHitDr, *t_trackL;
237 
238  std::vector<double> *t_maxNearP31x31;
239  std::vector<double> *t_maxNearP25x25;
240  std::vector<double> *t_maxNearP21x21;
241  std::vector<double> *t_maxNearP15x15;
242 
243  std::vector<int> *t_ecalSpike11x11;
244  std::vector<double> *t_e7x7, *t_e9x9, *t_e11x11, *t_e15x15;
250 
251  std::vector<double> *t_esimPdgId, *t_simTrackP;
252 
253  std::vector<double> *t_trkEcalEne;
254 
255  std::vector<double> *t_esim7x7, *t_esim9x9, *t_esim11x11, *t_esim15x15;
261 
263  std::vector<double> *t_h3x3, *t_h5x5, *t_h7x7;
264  std::vector<double> *t_h3x3Sig, *t_h5x5Sig, *t_h7x7Sig;
265  std::vector<int> *t_infoHcal;
266 
267  std::vector<double> *t_trkHcalEne;
268  std::vector<double> *t_hsim3x3, *t_hsim5x5, *t_hsim7x7;
270  std::vector<double> *t_hsim3x3Rest, *t_hsim5x5Rest, *t_hsim7x7Rest;
274 
276  int nbad;
277 };
278 
279 #endif
std::vector< double > * t_hsim7x7CharHad
double DeltaPhi(double v1, double v2)
std::vector< double > * t_hsim3x3Matched
std::vector< double > * t_esim7x7CharHad
std::vector< double > * t_e15x15
std::vector< double > * t_nTrksJetCalo
std::vector< double > * t_maxNearHcalP7x7
std::vector< double > * t_trackPt
std::vector< double > * t_trackPAll
std::vector< double > * t_e7x7
std::vector< double > * t_trackHcalPhi
std::vector< double > * t_trackDxyPVAll
std::vector< int > * t_trackHitOutMeasTEC
std::vector< double > * t_trackPdgIdAll
edm::InputTag JetExtender_
edm::InputTag L1extraCenJetSource_
std::vector< double > * t_trackOutPosOutHitDr
std::vector< double > * t_maxNearHcalP5x5
std::vector< double > * t_L1NonIsoEMPt
std::vector< int > * t_trackHitOutMeasTIB
std::vector< double > * t_esim7x7
std::vector< int > * t_trackHitInMissTOB
std::vector< double > * t_trackDz
std::vector< double > * t_trackEcalEta
std::vector< double > * t_trackEtaAll
std::vector< double > * t_esim11x11Matched
std::vector< double > * t_L1IsoEMEta
std::vector< double > * t_PVTracksSumPt
std::vector< double > * t_e9x9_10Sig
TH1F * h_maxNearP25x25[NPBins][NEtaBins]
std::vector< double > * t_hsim3x3CharHad
std::vector< int > * t_PVndof
std::vector< double > * t_hsim7x7Rest
std::vector< double > * t_L1TauJetPhi
std::vector< double > * t_PVTracksSumPtWt
std::vector< int > * t_infoHcal
std::vector< double > * t_e11x11_15Sig
static const size_t NEtaBins
std::vector< double > * t_L1TauJetPt
std::vector< int > * t_PVNTracksWt
std::vector< double > * t_trackEcalPhi
std::vector< double > * t_esim11x11NeutHad
std::vector< double > * t_L1TauJetEta
std::vector< double > * t_e15x15_15Sig
std::vector< double > * t_L1MuonEta
std::vector< double > * t_L1MuonPt
std::vector< double > * t_h3x3
std::vector< double > * t_L1MuonPhi
std::vector< double > * t_trackDxyAll
std::vector< double > * t_maxNearHcalP3x3
edm::InputTag L1extraIsoEmSource_
IsolatedTracksNxN(const edm::ParameterSet &)
std::vector< double > * t_hsim3x3Photon
std::vector< double > * t_PVTracksSumPtHP
std::vector< double > * t_esim11x11Rest
edm::InputTag L1GTReadoutRcdSource_
std::vector< int > * t_trackNOuterHits
std::vector< double > * t_h7x7Sig
std::vector< double > * t_e15x15_30Sig
std::vector< double > * t_trackPhiAll
std::vector< double > * t_e7x7_25Sig
std::vector< double > * t_trkHcalEne
edm::InputTag L1extraFwdJetSource_
std::vector< double > * t_e7x7_20Sig
std::vector< double > * t_e11x11_10Sig
std::vector< double > * t_trackPtAll
std::vector< double > * t_h3x3Sig
edm::Service< TFileService > fs
std::vector< double > * t_esimPdgId
std::vector< double > * t_e11x11_20Sig
std::vector< double > * t_jetEta
std::map< std::pair< unsigned int, std::string >, int > l1AlgoMap
std::vector< double > * t_maxNearP31x31
std::vector< int > * t_trackHitInMissTEC
std::vector< double > * t_trackEta
std::vector< double > * t_esim9x9Photon
std::vector< int > * t_trackHitInMeasTID
std::vector< double > * t_hsim5x5Rest
std::vector< double > * t_e11x11
std::vector< double > * t_esim15x15
std::vector< double > * t_L1CenJetPt
std::vector< double > * t_trackChiSqAll
edm::InputTag L1extraTauJetSource_
std::vector< double > * t_e15x15_25Sig
std::vector< int > * t_trackHitOutMissTIB
std::vector< double > * t_esim15x15Rest
std::vector< double > * t_esim11x11
std::vector< double > * t_hsim7x7
std::vector< int > * t_PVNTracksHPWt
std::vector< int > * t_trackHitOutMissTID
std::vector< int > * t_trackHitOutMissTOBTEC
edm::InputTag HBHERecHitSource_
std::vector< int > * t_trackHitsTEC
std::vector< double > * t_e9x9_30Sig
const MagneticField * bField
std::vector< double > * t_maxNearP25x25
std::vector< double > * t_L1CenJetPhi
std::vector< double > * t_L1FwdJetEta
std::vector< double > * t_h7x7
std::vector< int > * t_ecalSpike11x11
std::vector< double > * t_esim15x15NeutHad
std::vector< double > * t_e9x9_20Sig
std::vector< int > * t_trackHitOutMeasTOB
std::vector< int > * t_trackHitInMeasTIB
std::vector< double > * t_trackDzPV
std::vector< int > * t_PVNTracksHP
std::vector< double > * t_L1FwdJetPhi
std::vector< double > * t_nTrksJetVtx
unsigned int m_numberDaqPartitions
number of DAQ partitions
std::vector< double > * t_esim7x7NeutHad
std::vector< double > * t_hsim3x3NeutHad
std::vector< double > * t_L1NonIsoEMPhi
std::vector< double > * t_trackDzBS
void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< int > * t_trackHitOutMissTOB
std::vector< double > * t_L1CenJetEta
std::vector< double > * t_trackDzPVAll
std::vector< double > * t_esim7x7Matched
std::vector< double > * t_esim9x9
std::vector< double > * t_hsim5x5
std::vector< double > * t_h5x5
std::vector< double > * t_trackDxyPV
std::vector< double > * t_hsim5x5NeutHad
std::vector< double > * t_trackChiSq
std::vector< double > * t_maxNearP15x15
std::vector< double > * t_hsim5x5Photon
std::vector< double > * t_PVy
std::vector< unsigned int > m_triggerMaskAlgoTrig
std::vector< int > * t_L1PreScale
std::vector< double > * t_hsim3x3Rest
edm::InputTag L1extraNonIsoEmSource_
std::vector< int > * t_PVisValid
std::vector< double > * t_esim9x9Rest
std::vector< double > * t_L1METPhi
std::vector< int > * t_trackHitInMissTIB
std::vector< double > * t_e9x9_15Sig
std::vector< double > * t_e7x7_15Sig
std::vector< double > * t_trackPhi
std::vector< double > * t_e7x7_10Sig
std::vector< double > * t_trkEcalEne
std::vector< double > * t_trackDzAll
TH1F * h_maxNearP31x31[NPBins][NEtaBins]
std::vector< double > * t_esim11x11CharHad
TH1F * h_maxNearP15x15[NPBins][NEtaBins]
std::vector< double > * t_e9x9_25Sig
std::vector< double > * t_esim7x7Photon
std::vector< double > * t_esim9x9NeutHad
std::vector< double > * t_L1FwdJetPt
std::vector< double > * t_simTrackP
std::vector< double > * t_hsim7x7Matched
std::vector< int > * t_trackPVIdx
static const size_t nL1BitsMax
std::vector< int > * t_trackHitsTOB
std::vector< double > * t_esim9x9Matched
std::vector< double > * t_hsim7x7NeutHad
std::vector< double > * t_L1IsoEMPhi
std::vector< int > * t_PVNTracks
std::vector< double > * t_maxNearP21x21
std::vector< double > * t_L1NonIsoEMEta
std::vector< double > * t_PVz
void printTrack(const reco::Track *pTrack)
std::vector< double > * t_e15x15_20Sig
std::vector< double > * t_PVTracksSumPtHPWt
std::vector< double > * t_trackDxy
std::vector< std::string > * t_L1AlgoNames
std::vector< double > * t_hsim5x5CharHad
std::vector< double > * t_e15x15_10Sig
TH1F * h_maxNearP21x21[NPBins][NEtaBins]
std::vector< double > * t_jetPhi
std::vector< double > * t_trackL
std::vector< double > * t_esim7x7Rest
std::vector< double > * t_trackDxyBS
std::vector< double > * t_trackHcalEta
std::vector< double > * t_L1METPt
edm::InputTag L1extraMuonSource_
std::vector< int > * t_NLayersCrossed
double DeltaR(double eta1, double phi1, double eta2, double phi2)
edm::InputTag JetSrc_
const L1GtTriggerMask * m_l1GtTmAlgo
trigger masks &amp; veto masks
std::vector< int > * t_trackHitInMeasTOB
std::vector< double > * t_PVx
std::vector< int > * t_trackHitInMeasTEC
std::vector< double > * t_esim15x15Photon
std::vector< double > * t_e9x9
std::vector< double > * t_hsim5x5Matched
std::vector< double > * t_esim15x15Matched
std::vector< int > * t_trackHitOutMeasTID
std::vector< double > * t_L1METEta
std::vector< double > * t_e7x7_30Sig
std::vector< int > * t_trackHitOutMissTEC
std::vector< double > * t_e11x11_25Sig
std::vector< double > * t_hsim3x3
std::vector< double > * t_trackP
static const size_t NPBins
std::vector< double > * t_hsim7x7Photon
std::vector< double > * t_jetPt
std::vector< double > * t_L1IsoEMPt
std::vector< double > * t_esim11x11Photon
edm::InputTag L1GTObjectMapRcdSource_
std::vector< double > * t_h5x5Sig
std::vector< int > * t_trackHitInMissTID
std::vector< double > * t_e11x11_30Sig
std::vector< int > * t_trackHitInMissTIBTID
std::vector< double > * t_esim9x9CharHad
std::vector< double > * t_esim15x15CharHad