1 #ifndef MILLEPEDEMONITOR_H 2 #define MILLEPEDEMONITOR_H 56 void fillUsedTrack(
const reco::Track *track,
unsigned int nHitX,
unsigned int nHitY);
59 const float *localDerivs,
unsigned int nLocal,
60 const float *globalDerivs,
unsigned int nGlobal,
const int *
labels);
63 float residuum,
float sigma,
bool isY);
68 void fillPxbSurveyHistsChi2(
const float &
chi2);
69 void fillPxbSurveyHistsLocalPars(
const float &a0,
const float &a1,
const float &
S,
const float &phi);
73 bool equidistLogBins(
double*
bins,
int nBins,
double first,
double last)
const;
74 void fillResidualHists(
const std::vector<TH1*> &
hists,
float phiSensToNorm,
75 float residuum,
float sigma);
76 void fillResidualHitHists(
const std::vector<TH1*> &hists,
float angle,
77 float residuum,
float sigma,
unsigned int nHit);
78 void fillTrack(
const reco::Track *track, std::vector<TH1*> &trackHists1D,
79 std::vector<TH2*> &trackHists2D);
81 template <
class OBJECT_TYPE>
82 int GetIndex(
const std::vector<OBJECT_TYPE*> &vec,
const TString &
name);
83 template <
class OBJECT_TYPE>
84 std::vector<OBJECT_TYPE*> cloneHists(
const std::vector<OBJECT_TYPE*> &orgs,
85 const TString &namAd,
const TString &titAd)
const;
86 template <
class OBJECT_TYPE>
87 void addToDirectory(
const std::vector<OBJECT_TYPE*> &objs, TDirectory *
dir)
const;
88 template <
typename T,
size_t SIZE>
89 std::array<int,SIZE> indexArray1D(
const std::vector<T*>& hists,
const char*
title);
90 template <
typename T,
size_t SIZE>
91 std::array<std::array<int,SIZE>,SIZE> indexArray2D(
const std::vector<T*>& hists,
116 template <
class OBJECT_TYPE>
120 for (
typename std::vector<OBJECT_TYPE*>::const_iterator iter = vec.begin(), iterEnd = vec.end();
121 iter != iterEnd; ++iter, ++
result) {
122 if (*iter && (*iter)->GetName() ==
name)
return result;
124 edm::LogError(
"Alignment") <<
"@SUB=MillePedeMonitor::GetIndex" <<
" could not find " <<
name;
128 template <
class OBJECT_TYPE>
130 const TString &namAd,
131 const TString &titAd)
const 134 std::vector<OBJECT_TYPE*>
result;
135 for (
typename std::vector<OBJECT_TYPE*>::const_iterator iter = orgs.begin(), iterEnd = orgs.end();
136 iter != iterEnd; ++iter) {
137 if (!(*iter))
continue;
138 result.push_back(static_cast<OBJECT_TYPE*>((*iter)->Clone(namAd + (*iter)->GetName())));
139 if (result.back()) result.back()->SetTitle((*iter)->GetTitle() + titAd);
140 else edm::LogError(
"Alignment") <<
"@SUB=MillePedeMonitor::cloneHists" 148 template <
class OBJECT_TYPE>
150 TDirectory *
dir)
const 153 for (
typename std::vector<OBJECT_TYPE*>::const_iterator iter = obs.begin(), iterEnd = obs.end();
154 iter != iterEnd; ++iter) {
155 if (*iter) (*iter)->SetDirectory(dir);
159 template <
typename T,
size_t SIZE>
162 std::array<int,SIZE>
result{};
163 for (
size_t i = 0;
i < SIZE; ++
i) {
164 result[
i] = this->GetIndex(hists, Form(title,
i));
169 template <
typename T,
size_t SIZE>
170 std::array<std::array<int,SIZE>,SIZE>
172 std::array<std::array<int,SIZE>,SIZE>
result{};
173 for (
size_t i = 0;
i < SIZE; ++
i) {
174 for (
size_t j = 0; j < SIZE; ++j) {
175 result[
i][j] = this->GetIndex(hists, Form(title,
i, j));
std::array< std::array< int, SIZE >, SIZE > indexArray2D(const std::vector< T * > &hists, const char *title)
std::vector< TH1 * > myTrackHists1D
int GetIndex(const std::vector< OBJECT_TYPE * > &vec, const TString &name)
std::vector< TH2 * > myDerivHists2D
std::vector< std::vector< TH1 * > > myResidHistsVec1DX
std::vector< TH1 * > myTrajectoryHists1D
const TrackerTopology * trackerTopology
std::vector< TH1 * > myResidHitHists1DY
std::vector< OBJECT_TYPE * > cloneHists(const std::vector< OBJECT_TYPE * > &orgs, const TString &namAd, const TString &titAd) const
std::array< int, SIZE > indexArray1D(const std::vector< T * > &hists, const char *title)
void addToDirectory(const std::vector< OBJECT_TYPE * > &objs, TDirectory *dir) const
std::vector< TH2 * > myTrackHists2D
std::vector< TH2 * > myResidHists2D
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
std::vector< TH1 * > myCorrHists
std::vector< TH1 * > myPxbSurveyHists
std::vector< TH1 * > myUsedTrackHists1D
std::vector< TH2 * > myTrajectoryHists2D
std::vector< std::vector< TH1 * > > myResidHistsVec1DY
[0]=all [1]=TPB [2]=TPE [3]=TIB [4]=TID [5]=TOB [6]=TEC
std::vector< TH1 * > myResidHitHists1DX
[0]=all [1]=TPB [2]=TPE [3]=TIB [4]=TID [5]=TOB [6]=TEC
std::vector< TH2 * > myUsedTrackHists2D
std::vector< TH2 * > myFrame2FrameHists2D
T angle(T x1, T y1, T z1, T x2, T y2, T z2)