CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HTrack Class Reference

#include <HTrack.h>

Public Member Functions

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

Private Attributes

DQMStoredbe_
 
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 12 of file HTrack.h.

Constructor & Destructor Documentation

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

Definition at line 17 of file HTrack.cc.

References DQMStore::cd(), dbe_, 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, mergeVDriftHistosByStation::name, cmsCodeRules.cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().

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

Definition at line 147 of file HTrack.cc.

References HTrackVariables::computeEfficiency(), and hVariables.

147  {
148  return hVariables->computeEfficiency(sim);
149 }
double computeEfficiency(HTrackVariables *sim)
Definition: Histograms.h:92
HTrackVariables * hVariables
Definition: HTrack.h:50
void HTrack::computePull ( FreeTrajectoryState fts,
SimTrack simTracks,
HResolution hReso 
)

Definition at line 288 of file HTrack.cc.

References abs, FreeTrajectoryState::cartesianError(), FreeTrajectoryState::charge(), FreeTrajectoryState::curvilinearError(), benchmark_cfg::errors, PV3DBase< T, PVType, FrameType >::eta(), HResolution::Fill(), PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix_old(), CurvilinearTrajectoryError::matrix_old(), 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().

290  {
291 
292  // x,y,z, px,py,pz
294 
295  double partialPterror = errors[3][3]*pow(fts.momentum().x(),2) + errors[4][4]*pow(fts.momentum().y(),2);
296 
297  // sqrt( (px*spx)^2 + (py*spy)^2 ) / pt
298  double pterror = sqrt(partialPterror)/fts.momentum().perp();
299 
300  // sqrt( (px*spx)^2 + (py*spy)^2 + (pz*spz)^2 ) / p
301  double perror = sqrt(partialPterror+errors[5][5]*pow(fts.momentum().z(),2))/fts.momentum().mag();
302 
303  double phierror = sqrt(fts.curvilinearError().matrix_old()[2][2]);
304 
305  double etaerror = sqrt(fts.curvilinearError().matrix_old()[1][1])*abs(sin(fts.momentum().theta()));
306 
307 
308  hReso->Fill(simTrack.momentum().mag(),
309  sqrt(simTrack.momentum().Perp2()),
310  simTrack.momentum().eta(),
311  simTrack.momentum().phi(),
312  pull(fts.momentum().mag(),simTrack.momentum().mag(),perror),
313  pull(fts.momentum().perp(),sqrt(simTrack.momentum().Perp2()),pterror),
314  pull(fts.momentum().eta(),simTrack.momentum().eta(),etaerror),
315  pull(fts.momentum().phi(),simTrack.momentum().phi(),phierror),
316  pull(fts.charge() , -simTrack.type()/ abs(simTrack.type()), 1.)); // FIXME
317 }
T perp() const
Definition: PV3DBase.h:66
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
T y() const
Definition: PV3DBase.h:57
#define abs(x)
Definition: mlp_lapack.h:159
TrackCharge charge() const
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Theta< T > theta() const
Definition: PV3DBase.h:69
const AlgebraicSymMatrix matrix_old() const
T mag() const
Definition: PV3DBase.h:61
const AlgebraicSymMatrix matrix_old() const
Implicit conversion.
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
GlobalVector momentum() const
const CartesianTrajectoryError & cartesianError() const
T eta() const
Definition: PV3DBase.h:70
double pull(double rec, double sim, double sigmarec)
Definition: HTrack.cc:120
CLHEP::HepSymMatrix AlgebraicSymMatrix
virtual Int_t Fill(Double_t x, Double_t y)
Definition: Histograms.h:1457
T x() const
Definition: PV3DBase.h:56
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void HTrack::computeResolution ( FreeTrajectoryState fts,
SimTrack simTracks,
HResolution hReso 
)

Definition at line 255 of file HTrack.cc.

References 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().

257  {
258 
259 
260  hReso->Fill(simTrack.momentum().mag(),
261  sqrt(simTrack.momentum().Perp2()),
262  simTrack.momentum().eta(),
263  simTrack.momentum().phi(),
264  resolution(fts.momentum().mag(),simTrack.momentum().mag()),
265  resolution(fts.momentum().perp(),sqrt(simTrack.momentum().Perp2())),
266  fts.momentum().eta()-simTrack.momentum().eta(),
267  fts.momentum().phi()-simTrack.momentum().phi(),
268  fts.charge()+simTrack.type()/abs(simTrack.type())); // FIXME
269 }
T perp() const
Definition: PV3DBase.h:66
double resolution(double rec, double sim)
Definition: HTrack.cc:124
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
#define abs(x)
Definition: mlp_lapack.h:159
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:61
T sqrt(T t)
Definition: SSEVec.h:28
GlobalVector momentum() const
T eta() const
Definition: PV3DBase.h:70
virtual Int_t Fill(Double_t x, Double_t y)
Definition: Histograms.h:1457
void HTrack::computeResolutionAndPull ( TrajectoryStateOnSurface vtx,
SimTrack simTrack 
)

Definition at line 152 of file HTrack.cc.

References TrajectoryStateOnSurface::freeState().

Referenced by MuonTrackAnalyzer::fillPlots().

152  {
153  computeResolutionAndPull(*tsos.freeState(),simTrack);
154 }
void computeResolutionAndPull(TrajectoryStateOnSurface &vtx, SimTrack &simTrack)
Definition: HTrack.cc:152
void HTrack::computeResolutionAndPull ( FreeTrajectoryState fts,
SimTrack simTrack 
)

Definition at line 157 of file HTrack.cc.

References 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().

157  {
158 
159 
160  // Global Resolution
161  computeResolution(fts,simTrack,hResolution);
162  computePull(fts,simTrack,hPull);
163 
164  // TDR Resolution
165  computeTDRResolution(fts,simTrack,hTDRResolution);
166  // computeTDRPull(fts,simTracks,hTDRPull);
167 
168 
169  hVariables->Fill(sqrt(simTrack.momentum().Perp2()),
170  simTrack.momentum().eta(),
171  simTrack.momentum().phi()); //FIXME
172 
173 
174  if(doSubHisto){
175  // [5-10] GeV range
176  if(sqrt(simTrack.momentum().Perp2()) <10 ){
177  computeResolution(fts,simTrack,hResolution_5_10);
179  computePull(fts,simTrack,hPull_5_10);
180  }
181 
182  // [10-40] GeV range
183  if(sqrt(simTrack.momentum().Perp2()) >=10 && sqrt(simTrack.momentum().Perp2()) < 40){
184  computeResolution(fts,simTrack,hResolution_10_40);
186  computePull(fts,simTrack,hPull_10_40);
187  }
188 
189  // [40-70] GeV range
190  if(sqrt(simTrack.momentum().Perp2()) >=40 && sqrt(simTrack.momentum().Perp2()) < 70){
191  computeResolution(fts,simTrack,hResolution_40_70);
193  computePull(fts,simTrack,hPull_40_70);
194  }
195 
196  // [70-100] GeV range
197  if(sqrt(simTrack.momentum().Perp2()) >= 70 && sqrt(simTrack.momentum().Perp2()) < 100){
198  computeResolution(fts,simTrack,hResolution_70_100);
200  computePull(fts,simTrack,hPull_70_100);
201  }
202 
203  // eta range |eta|<0.8
204  if(abs(simTrack.momentum().eta()) <= 0.8){
205  computeResolution(fts,simTrack,hResolution_08);
207  computePull(fts,simTrack,hPull_08);
208  }
209 
210  // eta range 0.8<|eta|<1.2
211  if( abs(simTrack.momentum().eta()) > 0.8 && abs(simTrack.momentum().eta()) <= 1.2 ){
212  computeResolution(fts,simTrack,hResolution_08_12);
214  computePull(fts,simTrack,hPull_08_12);
215  }
216 
217  // eta range 1.2<|eta|<2.1
218  if( abs(simTrack.momentum().eta()) > 1.2 && abs(simTrack.momentum().eta()) <= 2.1 ){
219  computeResolution(fts,simTrack,hResolution_12_21);
221  computePull(fts,simTrack,hPull_12_21);
222 
223  if(simTrack.momentum().eta() > 0){
226  computePull(fts,simTrack,hPull_12_21_plus);
227  }
228  else{
231  computePull(fts,simTrack,hPull_12_21_minus);
232  }
233  }
234 
235  // eta range 1.2<|eta|<2.4
236  if( abs(simTrack.momentum().eta()) > 1.2 && abs(simTrack.momentum().eta()) <= 2.4 ){
237  computeResolution(fts,simTrack,hResolution_12_24);
239  computePull(fts,simTrack,hPull_12_24);
240 
241  if(simTrack.momentum().eta() > 0){
244  computePull(fts,simTrack,hPull_12_24_plus);
245  }
246  else{
249  computePull(fts,simTrack,hPull_12_24_minus);
250  }
251  }
252  }
253 }
void computePull(FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
Definition: HTrack.cc:288
void computeTDRResolution(FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
Definition: HTrack.cc:271
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
#define abs(x)
Definition: mlp_lapack.h:159
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
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:28
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 * hPull_40_70
Definition: HTrack.h:73
HResolution * hTDRResolution_08_12
Definition: HTrack.h:87
HResolution * hPull_12_24_minus
Definition: HTrack.h:118
void computeResolution(FreeTrajectoryState &fts, SimTrack &simTracks, HResolution *hReso)
Definition: HTrack.cc:255
HResolution * hPull_12_21_minus
Definition: HTrack.h:113
void Fill(double p, double pt, double eta, double phi, double charge)
Definition: Histograms.h:73
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
particle info...
Definition: CoreSimTrack.h:36
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
void HTrack::computeTDRResolution ( FreeTrajectoryState fts,
SimTrack simTracks,
HResolution hReso 
)

Definition at line 271 of file HTrack.cc.

References 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().

273  {
274 
275  int simCharge = -simTrack.type()/ abs(simTrack.type());
276 
277  double invSimP = (simTrack.momentum().mag() == 0 ) ? 0 : simTrack.momentum().mag();
278  double signedInverseRecMom = (simTrack.momentum().mag() == 0 ) ? 0 : fts.signedInverseMomentum();
279 
280  hReso->Fill(simTrack.momentum().mag(),
281  sqrt(simTrack.momentum().Perp2()),
282  simTrack.momentum().eta(),
283  simTrack.momentum().phi(),
284  resolution(signedInverseRecMom , simCharge*invSimP ),
285  resolution(fts.charge()/fts.momentum().perp(),simCharge/sqrt(simTrack.momentum().Perp2())));
286 }
T perp() const
Definition: PV3DBase.h:66
double resolution(double rec, double sim)
Definition: HTrack.cc:124
#define abs(x)
Definition: mlp_lapack.h:159
TrackCharge charge() const
T sqrt(T t)
Definition: SSEVec.h:28
GlobalVector momentum() const
virtual Int_t Fill(Double_t x, Double_t y)
Definition: Histograms.h:1457
double signedInverseMomentum() const
void HTrack::Fill ( TrajectoryStateOnSurface tsos)

Definition at line 129 of file HTrack.cc.

References TrajectoryStateOnSurface::freeState().

Referenced by MuonTrackAnalyzer::fillPlots().

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

Definition at line 133 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().

133  {
134 
135  hVariables->Fill(fts.momentum().mag(),
136  fts.momentum().perp(),
137  fts.momentum().eta(),
138  fts.momentum().phi(),
139  fts.charge());
140 }
T perp() const
Definition: PV3DBase.h:66
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
TrackCharge charge() const
T mag() const
Definition: PV3DBase.h:61
HTrackVariables * hVariables
Definition: HTrack.h:50
GlobalVector momentum() const
void Fill(double p, double pt, double eta, double phi, double charge)
Definition: Histograms.h:73
T eta() const
Definition: PV3DBase.h:70
void HTrack::FillDeltaR ( double  deltaR)

Definition at line 142 of file HTrack.cc.

References HTrackVariables::FillDeltaR(), and hVariables.

Referenced by MuonTrackAnalyzer::fillPlots().

142  {
144 }
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:88
double HTrack::pull ( double  rec,
double  sim,
double  sigmarec 
)

Definition at line 120 of file HTrack.cc.

Referenced by computePull().

120  {
121  return (rec-sim)/sigmarec;
122 }
Definition: sim.h:19
double HTrack::resolution ( double  rec,
double  sim 
)

Definition at line 124 of file HTrack.cc.

Referenced by computeResolution(), and computeTDRResolution().

124  {
125  return (rec-sim)/sim;
126 }
Definition: sim.h:19

Member Data Documentation

DQMStore* HTrack::dbe_
private

Definition at line 48 of file HTrack.h.

Referenced by HTrack().

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.