CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HTrack Class Reference

#include <HTrack.h>

Public Member Functions

double computeEfficiency (HTrackVariables *sim, DQMStore::IBooker &)
 
void computePull (const FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
 
void computeResolution (const FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
 
void computeResolutionAndPull (TrajectoryStateOnSurface &vtx, SimTrack &simTrack)
 
void computeResolutionAndPull (const FreeTrajectoryState &fts, SimTrack &simTrack)
 
void computeTDRResolution (const FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
 
void Fill (TrajectoryStateOnSurface &)
 
void Fill (const FreeTrajectoryState &)
 
void FillDeltaR (double)
 
 HTrack (DQMStore::IBooker &, std::string, std::string name, std::string whereIs="")
 
double pull (double rec, double sim, double sigmarec)
 
double resolution (double rec, double sim)
 

Private Attributes

bool doSubHisto
 
HResolutionhPull
 
HResolutionhPull_08
 
HResolutionhPull_08_12
 
HResolutionhPull_10_40
 
HResolutionhPull_12_21
 
HResolutionhPull_12_21_minus
 
HResolutionhPull_12_21_plus
 
HResolutionhPull_12_24
 
HResolutionhPull_12_24_minus
 
HResolutionhPull_12_24_plus
 
HResolutionhPull_40_70
 
HResolutionhPull_5_10
 
HResolutionhPull_70_100
 
HResolutionhResolution
 
HResolutionhResolution_08
 
HResolutionhResolution_08_12
 
HResolutionhResolution_10_40
 
HResolutionhResolution_12_21
 
HResolutionhResolution_12_21_minus
 
HResolutionhResolution_12_21_plus
 
HResolutionhResolution_12_24
 
HResolutionhResolution_12_24_minus
 
HResolutionhResolution_12_24_plus
 
HResolutionhResolution_40_70
 
HResolutionhResolution_5_10
 
HResolutionhResolution_70_100
 
HResolutionhTDRPull
 
HResolutionhTDRResolution
 
HResolutionhTDRResolution_08
 
HResolutionhTDRResolution_08_12
 
HResolutionhTDRResolution_10_40
 
HResolutionhTDRResolution_12_21
 
HResolutionhTDRResolution_12_21_minus
 
HResolutionhTDRResolution_12_21_plus
 
HResolutionhTDRResolution_12_24
 
HResolutionhTDRResolution_12_24_minus
 
HResolutionhTDRResolution_12_24_plus
 
HResolutionhTDRResolution_40_70
 
HResolutionhTDRResolution_5_10
 
HResolutionhTDRResolution_70_100
 
HTrackVariableshVariables
 
TString theName
 
TString where
 

Detailed Description

Definition at line 14 of file HTrack.h.

Constructor & Destructor Documentation

HTrack::HTrack ( DQMStore::IBooker ,
std::string  ,
std::string  name,
std::string  whereIs = "" 
)

Definition at line 17 of file HTrack.cc.

References DQMStore::IBooker::cd(), TrackerOfflineValidation_Dqm_cff::dirName, doSubHisto, hPull, hPull_08, hPull_08_12, hPull_10_40, hPull_12_21, hPull_12_21_minus, hPull_12_21_plus, hPull_12_24, hPull_12_24_minus, hPull_12_24_plus, hPull_40_70, hPull_5_10, hPull_70_100, hResolution, hResolution_08, hResolution_08_12, hResolution_10_40, hResolution_12_21, hResolution_12_21_minus, hResolution_12_21_plus, hResolution_12_24, hResolution_12_24_minus, hResolution_12_24_plus, hResolution_40_70, hResolution_5_10, hResolution_70_100, hTDRPull, hTDRResolution, hTDRResolution_08, hTDRResolution_08_12, hTDRResolution_10_40, hTDRResolution_12_21, hTDRResolution_12_21_minus, hTDRResolution_12_21_plus, hTDRResolution_12_24, hTDRResolution_12_24_minus, hTDRResolution_12_24_plus, hTDRResolution_40_70, hTDRResolution_5_10, hTDRResolution_70_100, hVariables, dataset::name, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

17  :theName(name.c_str()),where(whereIs.c_str()){
18 
19  ibooker.cd();
20  std::string dirName=dirName_;
21  dirName+="/";
22  dirName+=name;
23  dirName+="_";
24  dirName+=whereIs;
25 
26  ibooker.setCurrentFolder(dirName);
27  hVariables = new HTrackVariables(ibooker, dirName,name,whereIs);
28 
29  ibooker.cd();
30  string resName = dirName;
31  resName+="/Resolution";
32  hResolution = new HResolution(ibooker, resName,name+"_Res",whereIs);
33  ibooker.cd();
34  ibooker.setCurrentFolder(dirName);
35  hTDRResolution = new HResolution(ibooker, resName,name+"_TDRRes",whereIs);
36 
37  ibooker.cd();
38  ibooker.setCurrentFolder(dirName);
39  string pullName = dirName;
40  pullName+="/Pull";
41  hPull = new HResolution(ibooker, pullName,name+"_Pull",whereIs);
42  hTDRPull = new HResolution(ibooker,pullName,name+"_TDRPull",whereIs);
43 
44 
45  doSubHisto = false;
46 
47  if(doSubHisto){
48  ibooker.cd();
49  ibooker.setCurrentFolder(dirName);
50  string subName = dirName;
51  subName+="/subHistos";
52  // [5-10] GeV range
53  hResolution_5_10 = new HResolution(ibooker, subName,name+"_Res_Pt_5_10",whereIs);
54  hTDRResolution_5_10 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_5_10",whereIs);
55  hPull_5_10 = new HResolution(ibooker, subName,name+"_Pull_Pt_5_10",whereIs);
56 
57 
58  hResolution_10_40 = new HResolution(ibooker, subName,name+"_Res_Pt_10_40",whereIs);
59  hTDRResolution_10_40 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_10_40",whereIs);
60  hPull_10_40 = new HResolution(ibooker, subName,name+"_Pull_Pt_10_40",whereIs);
61 
62 
63  hResolution_40_70 = new HResolution(ibooker, subName,name+"_Res_Pt_40_70",whereIs);
64  hTDRResolution_40_70 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_40_70",whereIs);
65  hPull_40_70 = new HResolution(ibooker, subName,name+"_Pull_Pt_40_70",whereIs);
66 
67 
68  hResolution_70_100 = new HResolution(ibooker, subName,name+"_Res_Pt_70_100",whereIs);
69  hTDRResolution_70_100 = new HResolution(ibooker, subName,name+"_TDRRes_Pt_70_100",whereIs);
70  hPull_70_100 = new HResolution(ibooker, subName,name+"_Pull_Pt_70_100",whereIs);
71 
72 
73  hResolution_08 = new HResolution(ibooker, subName,name+"_Res_Eta_08",whereIs);
74  hTDRResolution_08 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_08",whereIs);
75  hPull_08 = new HResolution(ibooker, subName,name+"_Pull_Eta_08",whereIs);
76 
77 
78  hResolution_08_12 = new HResolution(ibooker, subName,name+"_Res_Eta_08_12",whereIs);
79  hTDRResolution_08_12 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_08_12",whereIs);
80  hPull_08_12 = new HResolution(ibooker, subName,name+"_Pull_Eta_08_12",whereIs);
81 
82 
83  hResolution_12_21 = new HResolution(ibooker, subName,name+"_Res_Eta_12_21",whereIs);
84  hTDRResolution_12_21 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_21",whereIs);
85  hPull_12_21 = new HResolution(ibooker, subName,name+"_Pull_Eta_12_21",whereIs);
86 
87 
88  hResolution_12_24 = new HResolution(ibooker, subName,name+"_Res_Eta_12_24",whereIs);
89  hTDRResolution_12_24 = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_24",whereIs);
90  hPull_12_24 = new HResolution(ibooker, subName,name+"_Pull_Eta_12_24",whereIs);
91 
92 
93  hResolution_12_21_plus = new HResolution(ibooker, subName,name+"_Res_Eta_12_21_plus",whereIs);
94  hTDRResolution_12_21_plus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_21_plus",whereIs);
95  hPull_12_21_plus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_21_plus",whereIs);
96 
97 
98  hResolution_12_24_plus = new HResolution(ibooker, subName,name+"_Res_Eta_12_24_plus",whereIs);
99  hTDRResolution_12_24_plus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_24_plus",whereIs);
100  hPull_12_24_plus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_24_plus",whereIs);
101 
102 
103  hResolution_12_21_minus = new HResolution(ibooker, subName,name+"_Res_Eta_12_21_minus",whereIs);
104  hTDRResolution_12_21_minus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_21_minus",whereIs);
105  hPull_12_21_minus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_21_minus",whereIs);
106 
107 
108  hResolution_12_24_minus = new HResolution(ibooker, subName,name+"_Res_Eta_12_24_minus",whereIs);
109  hTDRResolution_12_24_minus = new HResolution(ibooker, subName,name+"_TDRRes_Eta_12_24_minus",whereIs);
110  hPull_12_24_minus = new HResolution(ibooker, subName,name+"_Pull_Eta_12_24_minus",whereIs);
111  }
112 }
HResolution * hPull_08_12
Definition: HTrack.h:88
HResolution * hResolution_12_21
Definition: HTrack.h:91
HResolution * hTDRResolution
Definition: HTrack.h:57
HResolution * hTDRResolution_12_24_plus
Definition: HTrack.h:107
HResolution * hPull
Definition: HTrack.h:54
HResolution * hResolution
Definition: HTrack.h:53
HResolution * hTDRResolution_12_24
Definition: HTrack.h:97
HResolution * hTDRResolution_40_70
Definition: HTrack.h:72
HResolution * hResolution_12_24_plus
Definition: HTrack.h:106
TString where
Definition: HTrack.h:121
HResolution * hResolution_10_40
Definition: HTrack.h:66
HResolution * hPull_10_40
Definition: HTrack.h:68
HResolution * hResolution_12_24
Definition: HTrack.h:96
HResolution * hResolution_12_21_plus
Definition: HTrack.h:101
TString theName
Definition: HTrack.h:120
HResolution * hTDRResolution_5_10
Definition: HTrack.h:62
HResolution * hResolution_12_24_minus
Definition: HTrack.h:116
HResolution * hResolution_5_10
Definition: HTrack.h:61
HTrackVariables * hVariables
Definition: HTrack.h:50
HResolution * hTDRResolution_12_21_minus
Definition: HTrack.h:112
HResolution * hPull_12_21
Definition: HTrack.h:93
HResolution * hResolution_08_12
Definition: HTrack.h:86
HResolution * hTDRResolution_12_21
Definition: HTrack.h:92
HResolution * hTDRResolution_12_24_minus
Definition: HTrack.h:117
HResolution * hResolution_40_70
Definition: HTrack.h:71
HResolution * hResolution_08
Definition: HTrack.h:81
HResolution * hPull_70_100
Definition: HTrack.h:78
bool doSubHisto
Definition: HTrack.h:123
HResolution * hTDRPull
Definition: HTrack.h:58
HResolution * hPull_40_70
Definition: HTrack.h:73
HResolution * hTDRResolution_08_12
Definition: HTrack.h:87
HResolution * hPull_12_24_minus
Definition: HTrack.h:118
HResolution * hPull_12_21_minus
Definition: HTrack.h:113
HResolution * hPull_12_24
Definition: HTrack.h:98
HResolution * hTDRResolution_70_100
Definition: HTrack.h:77
HResolution * hTDRResolution_08
Definition: HTrack.h:82
HResolution * hPull_12_24_plus
Definition: HTrack.h:108
HResolution * hResolution_70_100
Definition: HTrack.h:76
HResolution * hTDRResolution_10_40
Definition: HTrack.h:67
HResolution * hPull_5_10
Definition: HTrack.h:63
HResolution * hPull_08
Definition: HTrack.h:83
HResolution * hResolution_12_21_minus
Definition: HTrack.h:111
HResolution * hPull_12_21_plus
Definition: HTrack.h:103
HResolution * hTDRResolution_12_21_plus
Definition: HTrack.h:102

Member Function Documentation

double HTrack::computeEfficiency ( HTrackVariables sim,
DQMStore::IBooker ibooker 
)

Definition at line 141 of file HTrack.cc.

References HTrackVariables::computeEfficiency(), and hVariables.

141  {
142  return hVariables->computeEfficiency(sim,ibooker);
143 }
double computeEfficiency(HTrackVariables *sim, DQMStore::IBooker &ibooker)
Definition: Histograms.h:90
HTrackVariables * hVariables
Definition: HTrack.h:50
void HTrack::computePull ( const FreeTrajectoryState fts,
SimTrack simTracks,
HResolution hReso 
)

Definition at line 282 of file HTrack.cc.

References funct::abs(), FreeTrajectoryState::cartesianError(), FreeTrajectoryState::charge(), FreeTrajectoryState::curvilinearError(), PV3DBase< T, PVType, FrameType >::eta(), etaerror, HResolution::Fill(), PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix(), CurvilinearTrajectoryError::matrix(), CoreSimTrack::momentum(), FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), funct::pow(), pull(), funct::sin(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::theta(), CoreSimTrack::type(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeResolutionAndPull().

284  {
285 
286  // x,y,z, px,py,pz
288 
289  double partialPterror = errors[3][3]*pow(fts.momentum().x(),2) + errors[4][4]*pow(fts.momentum().y(),2);
290 
291  // sqrt( (px*spx)^2 + (py*spy)^2 ) / pt
292  double pterror = sqrt(partialPterror)/fts.momentum().perp();
293 
294  // sqrt( (px*spx)^2 + (py*spy)^2 + (pz*spz)^2 ) / p
295  double perror = sqrt(partialPterror+errors[5][5]*pow(fts.momentum().z(),2))/fts.momentum().mag();
296 
297  double phierror = sqrt(fts.curvilinearError().matrix()[2][2]);
298 
299  double etaerror = sqrt(fts.curvilinearError().matrix()[1][1])*abs(sin(fts.momentum().theta()));
300 
301 
302  hReso->Fill(simTrack.momentum().mag(),
303  sqrt(simTrack.momentum().Perp2()),
304  simTrack.momentum().eta(),
305  simTrack.momentum().phi(),
306  pull(fts.momentum().mag(),simTrack.momentum().mag(),perror),
307  pull(fts.momentum().perp(),sqrt(simTrack.momentum().Perp2()),pterror),
308  pull(fts.momentum().eta(),simTrack.momentum().eta(),etaerror),
309  pull(fts.momentum().phi(),simTrack.momentum().phi(),phierror),
310  pull(fts.charge() , -simTrack.type()/ abs(simTrack.type()), 1.)); // FIXME
311 }
CartesianTrajectoryError cartesianError() const
T perp() const
Definition: PV3DBase.h:72
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
T mag() const
Definition: PV3DBase.h:67
simTrack
per collection params
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
Int_t Fill(Double_t x, Double_t y) override
Definition: Histograms.h:1739
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GlobalVector momentum() const
const AlgebraicSymMatrix66 & matrix() const
T eta() const
Definition: PV3DBase.h:76
const AlgebraicSymMatrix55 & matrix() const
double pull(double rec, double sim, double sigmarec)
Definition: HTrack.cc:114
Definition: errors.py:1
T x() const
Definition: PV3DBase.h:62
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void HTrack::computeResolution ( const FreeTrajectoryState fts,
SimTrack simTracks,
HResolution hReso 
)

Definition at line 249 of file HTrack.cc.

References funct::abs(), FreeTrajectoryState::charge(), PV3DBase< T, PVType, FrameType >::eta(), HResolution::Fill(), PV3DBase< T, PVType, FrameType >::mag(), CoreSimTrack::momentum(), FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), resolution(), mathSSE::sqrt(), and CoreSimTrack::type().

Referenced by computeResolutionAndPull().

251  {
252 
253 
254  hReso->Fill(simTrack.momentum().mag(),
255  sqrt(simTrack.momentum().Perp2()),
256  simTrack.momentum().eta(),
257  simTrack.momentum().phi(),
258  resolution(fts.momentum().mag(),simTrack.momentum().mag()),
259  resolution(fts.momentum().perp(),sqrt(simTrack.momentum().Perp2())),
260  fts.momentum().eta()-simTrack.momentum().eta(),
261  fts.momentum().phi()-simTrack.momentum().phi(),
262  fts.charge()+simTrack.type()/abs(simTrack.type())); // FIXME
263 }
T perp() const
Definition: PV3DBase.h:72
double resolution(double rec, double sim)
Definition: HTrack.cc:118
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:67
simTrack
per collection params
T sqrt(T t)
Definition: SSEVec.h:18
Int_t Fill(Double_t x, Double_t y) override
Definition: Histograms.h:1739
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GlobalVector momentum() const
T eta() const
Definition: PV3DBase.h:76
void HTrack::computeResolutionAndPull ( TrajectoryStateOnSurface vtx,
SimTrack simTrack 
)

Definition at line 146 of file HTrack.cc.

References TrajectoryStateOnSurface::freeState(), and simTrackMatching_cfi::simTrack.

Referenced by MuonTrackAnalyzer::fillPlots().

146  {
147  computeResolutionAndPull(*tsos.freeState(),simTrack);
148 }
void computeResolutionAndPull(TrajectoryStateOnSurface &vtx, SimTrack &simTrack)
Definition: HTrack.cc:146
simTrack
per collection params
void HTrack::computeResolutionAndPull ( const FreeTrajectoryState fts,
SimTrack simTrack 
)

Definition at line 151 of file HTrack.cc.

References funct::abs(), computePull(), computeResolution(), computeTDRResolution(), doSubHisto, HTrackVariables::Fill(), hPull, hPull_08, hPull_08_12, hPull_10_40, hPull_12_21, hPull_12_21_minus, hPull_12_21_plus, hPull_12_24, hPull_12_24_minus, hPull_12_24_plus, hPull_40_70, hPull_5_10, hPull_70_100, hResolution, hResolution_08, hResolution_08_12, hResolution_10_40, hResolution_12_21, hResolution_12_21_minus, hResolution_12_21_plus, hResolution_12_24, hResolution_12_24_minus, hResolution_12_24_plus, hResolution_40_70, hResolution_5_10, hResolution_70_100, hTDRResolution, hTDRResolution_08, hTDRResolution_08_12, hTDRResolution_10_40, hTDRResolution_12_21, hTDRResolution_12_21_minus, hTDRResolution_12_21_plus, hTDRResolution_12_24, hTDRResolution_12_24_minus, hTDRResolution_12_24_plus, hTDRResolution_40_70, hTDRResolution_5_10, hTDRResolution_70_100, hVariables, CoreSimTrack::momentum(), and mathSSE::sqrt().

151  {
152 
153 
154  // Global Resolution
155  computeResolution(fts,simTrack,hResolution);
156  computePull(fts,simTrack,hPull);
157 
158  // TDR Resolution
159  computeTDRResolution(fts,simTrack,hTDRResolution);
160  // computeTDRPull(fts,simTracks,hTDRPull);
161 
162 
163  hVariables->Fill(sqrt(simTrack.momentum().Perp2()),
164  simTrack.momentum().eta(),
165  simTrack.momentum().phi()); //FIXME
166 
167 
168  if(doSubHisto){
169  // [5-10] GeV range
170  if(sqrt(simTrack.momentum().Perp2()) <10 ){
171  computeResolution(fts,simTrack,hResolution_5_10);
173  computePull(fts,simTrack,hPull_5_10);
174  }
175 
176  // [10-40] GeV range
177  if(sqrt(simTrack.momentum().Perp2()) >=10 && sqrt(simTrack.momentum().Perp2()) < 40){
178  computeResolution(fts,simTrack,hResolution_10_40);
180  computePull(fts,simTrack,hPull_10_40);
181  }
182 
183  // [40-70] GeV range
184  if(sqrt(simTrack.momentum().Perp2()) >=40 && sqrt(simTrack.momentum().Perp2()) < 70){
185  computeResolution(fts,simTrack,hResolution_40_70);
187  computePull(fts,simTrack,hPull_40_70);
188  }
189 
190  // [70-100] GeV range
191  if(sqrt(simTrack.momentum().Perp2()) >= 70 && sqrt(simTrack.momentum().Perp2()) < 100){
192  computeResolution(fts,simTrack,hResolution_70_100);
194  computePull(fts,simTrack,hPull_70_100);
195  }
196 
197  // eta range |eta|<0.8
198  if(abs(simTrack.momentum().eta()) <= 0.8){
199  computeResolution(fts,simTrack,hResolution_08);
201  computePull(fts,simTrack,hPull_08);
202  }
203 
204  // eta range 0.8<|eta|<1.2
205  if( abs(simTrack.momentum().eta()) > 0.8 && abs(simTrack.momentum().eta()) <= 1.2 ){
206  computeResolution(fts,simTrack,hResolution_08_12);
208  computePull(fts,simTrack,hPull_08_12);
209  }
210 
211  // eta range 1.2<|eta|<2.1
212  if( abs(simTrack.momentum().eta()) > 1.2 && abs(simTrack.momentum().eta()) <= 2.1 ){
213  computeResolution(fts,simTrack,hResolution_12_21);
215  computePull(fts,simTrack,hPull_12_21);
216 
217  if(simTrack.momentum().eta() > 0){
220  computePull(fts,simTrack,hPull_12_21_plus);
221  }
222  else{
225  computePull(fts,simTrack,hPull_12_21_minus);
226  }
227  }
228 
229  // eta range 1.2<|eta|<2.4
230  if( abs(simTrack.momentum().eta()) > 1.2 && abs(simTrack.momentum().eta()) <= 2.4 ){
231  computeResolution(fts,simTrack,hResolution_12_24);
233  computePull(fts,simTrack,hPull_12_24);
234 
235  if(simTrack.momentum().eta() > 0){
238  computePull(fts,simTrack,hPull_12_24_plus);
239  }
240  else{
243  computePull(fts,simTrack,hPull_12_24_minus);
244  }
245  }
246  }
247 }
HResolution * hPull_08_12
Definition: HTrack.h:88
HResolution * hResolution_12_21
Definition: HTrack.h:91
HResolution * hTDRResolution
Definition: HTrack.h:57
HResolution * hTDRResolution_12_24_plus
Definition: HTrack.h:107
HResolution * hPull
Definition: HTrack.h:54
HResolution * hResolution
Definition: HTrack.h:53
HResolution * hTDRResolution_12_24
Definition: HTrack.h:97
HResolution * hTDRResolution_40_70
Definition: HTrack.h:72
HResolution * hResolution_12_24_plus
Definition: HTrack.h:106
void computeTDRResolution(const FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
Definition: HTrack.cc:265
HResolution * hResolution_10_40
Definition: HTrack.h:66
HResolution * hPull_10_40
Definition: HTrack.h:68
HResolution * hResolution_12_24
Definition: HTrack.h:96
void computeResolution(const FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
Definition: HTrack.cc:249
HResolution * hResolution_12_21_plus
Definition: HTrack.h:101
HResolution * hTDRResolution_5_10
Definition: HTrack.h:62
HResolution * hResolution_12_24_minus
Definition: HTrack.h:116
HResolution * hResolution_5_10
Definition: HTrack.h:61
HTrackVariables * hVariables
Definition: HTrack.h:50
HResolution * hTDRResolution_12_21_minus
Definition: HTrack.h:112
HResolution * hPull_12_21
Definition: HTrack.h:93
HResolution * hResolution_08_12
Definition: HTrack.h:86
T sqrt(T t)
Definition: SSEVec.h:18
HResolution * hTDRResolution_12_21
Definition: HTrack.h:92
HResolution * hTDRResolution_12_24_minus
Definition: HTrack.h:117
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HResolution * hResolution_40_70
Definition: HTrack.h:71
HResolution * hResolution_08
Definition: HTrack.h:81
HResolution * hPull_70_100
Definition: HTrack.h:78
bool doSubHisto
Definition: HTrack.h:123
HResolution * hPull_40_70
Definition: HTrack.h:73
HResolution * hTDRResolution_08_12
Definition: HTrack.h:87
HResolution * hPull_12_24_minus
Definition: HTrack.h:118
HResolution * hPull_12_21_minus
Definition: HTrack.h:113
void Fill(double p, double pt, double eta, double phi, double charge)
Definition: Histograms.h:71
HResolution * hPull_12_24
Definition: HTrack.h:98
HResolution * hTDRResolution_70_100
Definition: HTrack.h:77
HResolution * hTDRResolution_08
Definition: HTrack.h:82
HResolution * hPull_12_24_plus
Definition: HTrack.h:108
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
HResolution * hResolution_70_100
Definition: HTrack.h:76
HResolution * hTDRResolution_10_40
Definition: HTrack.h:67
void computePull(const FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
Definition: HTrack.cc:282
HResolution * hPull_5_10
Definition: HTrack.h:63
HResolution * hPull_08
Definition: HTrack.h:83
HResolution * hResolution_12_21_minus
Definition: HTrack.h:111
HResolution * hPull_12_21_plus
Definition: HTrack.h:103
HResolution * hTDRResolution_12_21_plus
Definition: HTrack.h:102
void HTrack::computeTDRResolution ( const FreeTrajectoryState fts,
SimTrack simTracks,
HResolution hReso 
)

Definition at line 265 of file HTrack.cc.

References funct::abs(), FreeTrajectoryState::charge(), HResolution::Fill(), CoreSimTrack::momentum(), FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp(), resolution(), FreeTrajectoryState::signedInverseMomentum(), mathSSE::sqrt(), and CoreSimTrack::type().

Referenced by computeResolutionAndPull().

267  {
268 
269  int simCharge = -simTrack.type()/ abs(simTrack.type());
270 
271  double invSimP = (simTrack.momentum().mag() == 0 ) ? 0 : simTrack.momentum().mag();
272  double signedInverseRecMom = (simTrack.momentum().mag() == 0 ) ? 0 : fts.signedInverseMomentum();
273 
274  hReso->Fill(simTrack.momentum().mag(),
275  sqrt(simTrack.momentum().Perp2()),
276  simTrack.momentum().eta(),
277  simTrack.momentum().phi(),
278  resolution(signedInverseRecMom , simCharge*invSimP ),
279  resolution(fts.charge()/fts.momentum().perp(),simCharge/sqrt(simTrack.momentum().Perp2())));
280 }
T perp() const
Definition: PV3DBase.h:72
double resolution(double rec, double sim)
Definition: HTrack.cc:118
TrackCharge charge() const
simTrack
per collection params
T sqrt(T t)
Definition: SSEVec.h:18
Int_t Fill(Double_t x, Double_t y) override
Definition: Histograms.h:1739
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GlobalVector momentum() const
double signedInverseMomentum() const
void HTrack::Fill ( TrajectoryStateOnSurface tsos)

Definition at line 123 of file HTrack.cc.

References TrajectoryStateOnSurface::freeState().

Referenced by MuonTrackAnalyzer::fillPlots().

123  {
124  Fill(*tsos.freeState());
125 }
FreeTrajectoryState const * freeState(bool withErrors=true) const
void Fill(TrajectoryStateOnSurface &)
Definition: HTrack.cc:123
void HTrack::Fill ( const FreeTrajectoryState fts)

Definition at line 127 of file HTrack.cc.

References FreeTrajectoryState::charge(), PV3DBase< T, PVType, FrameType >::eta(), HTrackVariables::Fill(), hVariables, PV3DBase< T, PVType, FrameType >::mag(), FreeTrajectoryState::momentum(), PV3DBase< T, PVType, FrameType >::perp(), and PV3DBase< T, PVType, FrameType >::phi().

127  {
128 
129  hVariables->Fill(fts.momentum().mag(),
130  fts.momentum().perp(),
131  fts.momentum().eta(),
132  fts.momentum().phi(),
133  fts.charge());
134 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:67
HTrackVariables * hVariables
Definition: HTrack.h:50
GlobalVector momentum() const
void Fill(double p, double pt, double eta, double phi, double charge)
Definition: Histograms.h:71
T eta() const
Definition: PV3DBase.h:76
void HTrack::FillDeltaR ( double  deltaR)

Definition at line 136 of file HTrack.cc.

References HTrackVariables::FillDeltaR(), and hVariables.

Referenced by MuonTrackAnalyzer::fillPlots().

136  {
138 }
HTrackVariables * hVariables
Definition: HTrack.h:50
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
void FillDeltaR(double deltaR)
Definition: Histograms.h:86
double HTrack::pull ( double  rec,
double  sim,
double  sigmarec 
)

Definition at line 114 of file HTrack.cc.

Referenced by computePull().

114  {
115  return (rec-sim)/sigmarec;
116 }
Definition: RunManager.h:28
double HTrack::resolution ( double  rec,
double  sim 
)

Definition at line 118 of file HTrack.cc.

References particleFlowSimParticle_cfi::sim.

Referenced by computeResolution(), and computeTDRResolution().

118  {
119  return (rec-sim)/sim;
120 }
Definition: RunManager.h:28

Member Data Documentation

bool HTrack::doSubHisto
private

Definition at line 123 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull
private

Definition at line 54 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_08
private

Definition at line 83 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_08_12
private

Definition at line 88 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_10_40
private

Definition at line 68 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_12_21
private

Definition at line 93 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_12_21_minus
private

Definition at line 113 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_12_21_plus
private

Definition at line 103 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_12_24
private

Definition at line 98 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_12_24_minus
private

Definition at line 118 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_12_24_plus
private

Definition at line 108 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_40_70
private

Definition at line 73 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_5_10
private

Definition at line 63 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hPull_70_100
private

Definition at line 78 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution
private

Definition at line 53 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_08
private

Definition at line 81 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_08_12
private

Definition at line 86 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_10_40
private

Definition at line 66 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_12_21
private

Definition at line 91 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_12_21_minus
private

Definition at line 111 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_12_21_plus
private

Definition at line 101 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_12_24
private

Definition at line 96 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_12_24_minus
private

Definition at line 116 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_12_24_plus
private

Definition at line 106 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_40_70
private

Definition at line 71 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_5_10
private

Definition at line 61 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hResolution_70_100
private

Definition at line 76 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRPull
private

Definition at line 58 of file HTrack.h.

Referenced by HTrack().

HResolution* HTrack::hTDRResolution
private

Definition at line 57 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_08
private

Definition at line 82 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_08_12
private

Definition at line 87 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_10_40
private

Definition at line 67 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_12_21
private

Definition at line 92 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_12_21_minus
private

Definition at line 112 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_12_21_plus
private

Definition at line 102 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_12_24
private

Definition at line 97 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_12_24_minus
private

Definition at line 117 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_12_24_plus
private

Definition at line 107 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_40_70
private

Definition at line 72 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_5_10
private

Definition at line 62 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HResolution* HTrack::hTDRResolution_70_100
private

Definition at line 77 of file HTrack.h.

Referenced by computeResolutionAndPull(), and HTrack().

HTrackVariables* HTrack::hVariables
private

Definition at line 50 of file HTrack.h.

Referenced by computeEfficiency(), computeResolutionAndPull(), Fill(), FillDeltaR(), and HTrack().

TString HTrack::theName
private

Definition at line 120 of file HTrack.h.

TString HTrack::where
private

Definition at line 121 of file HTrack.h.