1 #ifndef MILLEPEDEMONITOR_H
2 #define MILLEPEDEMONITOR_H
58 const float *localDerivs,
60 const float *globalDerivs,
81 const std::vector<TH1 *> &hists,
float angle,
float residuum,
float sigma,
unsigned int nHit);
82 void fillTrack(
const reco::Track *track, std::vector<TH1 *> &trackHists1D, std::vector<TH2 *> &trackHists2D);
84 template <
class OBJECT_TYPE>
85 int GetIndex(
const std::vector<OBJECT_TYPE *> &vec,
const TString &
name);
86 template <
class OBJECT_TYPE>
87 std::vector<OBJECT_TYPE *>
cloneHists(
const std::vector<OBJECT_TYPE *> &orgs,
89 const TString &titAd)
const;
90 template <
class OBJECT_TYPE>
91 void addToDirectory(
const std::vector<OBJECT_TYPE *> &objs, TDirectory *
dir)
const;
92 template <
typename T,
size_t SIZE>
93 std::array<int, SIZE>
indexArray1D(
const std::vector<T *> &hists,
const char *
title);
94 template <
typename T,
size_t SIZE>
95 std::array<std::array<int, SIZE>,
SIZE>
indexArray2D(
const std::vector<T *> &hists,
const char *title);
119 template <
class OBJECT_TYPE>
122 for (
typename std::vector<OBJECT_TYPE *>::const_iterator iter = vec.begin(), iterEnd = vec.end(); iter != iterEnd;
124 if (*iter && (*iter)->GetName() ==
name)
127 edm::LogError(
"Alignment") <<
"@SUB=MillePedeMonitor::GetIndex"
128 <<
" could not find " <<
name;
132 template <
class OBJECT_TYPE>
134 const TString &namAd,
135 const TString &titAd)
const {
137 std::vector<OBJECT_TYPE *>
result;
138 for (
typename std::vector<OBJECT_TYPE *>::const_iterator iter = orgs.begin(), iterEnd = orgs.end(); iter != iterEnd;
142 result.push_back(static_cast<OBJECT_TYPE *>((*iter)->Clone(namAd + (*iter)->GetName())));
144 result.back()->SetTitle((*iter)->GetTitle() + titAd);
146 edm::LogError(
"Alignment") <<
"@SUB=MillePedeMonitor::cloneHists"
153 template <
class OBJECT_TYPE>
156 for (
typename std::vector<OBJECT_TYPE *>::const_iterator iter = obs.begin(), iterEnd = obs.end(); iter != iterEnd;
159 (*iter)->SetDirectory(dir);
163 template <
typename T,
size_t SIZE>
165 std::array<int, SIZE>
result{};
166 for (
size_t i = 0;
i <
SIZE; ++
i) {
172 template <
typename T,
size_t SIZE>
175 std::array<std::array<int, SIZE>,
SIZE>
result{};
176 for (
size_t i = 0;
i <
SIZE; ++
i) {
177 for (
size_t j = 0;
j <
SIZE; ++
j) {
std::vector< std::vector< TH1 * > > myResidHistsVec1DY
[0]=all [1]=TPB [2]=TPE [3]=TIB [4]=TID [5]=TOB [6]=TEC
std::vector< TH2 * > myResidHists2D
std::array< std::array< int, SIZE >, SIZE > indexArray2D(const std::vector< T * > &hists, const char *title)
int GetIndex(const std::vector< OBJECT_TYPE * > &vec, const TString &name)
void fillCorrelations2D(float corr, const TransientTrackingRecHit::ConstRecHitPointer &hit)
std::vector< TH1 * > myUsedTrackHists1D
std::vector< TH1 * > myCorrHists
void fillFrameToFrame(const AlignableDetOrUnitPtr &aliDet, const Alignable *ali)
std::vector< TH1 * > myPxbSurveyHists
void fillPxbSurveyHistsLocalPars(const float &a0, const float &a1, const float &S, const float &phi)
const TrackerTopology * trackerTopology
Log< level::Error, false > LogError
std::vector< OBJECT_TYPE * > cloneHists(const std::vector< OBJECT_TYPE * > &orgs, const TString &namAd, const TString &titAd) const
std::vector< TH1 * > myResidHitHists1DX
[0]=all [1]=TPB [2]=TPE [3]=TIB [4]=TID [5]=TOB [6]=TEC
std::array< int, SIZE > indexArray1D(const std::vector< T * > &hists, const char *title)
MillePedeMonitor(const TrackerTopology *tTopo, const char *rootFile="trackMonitor.root")
void fillResiduals(const TransientTrackingRecHit::ConstRecHitPointer &recHit, const TrajectoryStateOnSurface &tsos, unsigned int nHit, float residuum, float sigma, bool isY)
void fillPxbSurveyHistsChi2(const float &chi2)
std::vector< TH2 * > myUsedTrackHists2D
void addToDirectory(const std::vector< OBJECT_TYPE * > &objs, TDirectory *dir) const
std::vector< TH2 * > myTrackHists2D
std::vector< TH2 * > myDerivHists2D
void fillUsedTrack(const reco::Track *track, unsigned int nHitX, unsigned int nHitY)
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
std::vector< TH1 * > myTrajectoryHists1D
std::vector< TH2 * > myTrajectoryHists2D
bool init(TDirectory *directory)
std::vector< TH2 * > myFrame2FrameHists2D
bool equidistLogBins(double *bins, int nBins, double first, double last) const
static constexpr float a0
void fillResidualHists(const std::vector< TH1 * > &hists, float phiSensToNorm, float residuum, float sigma)
void fillTrack(const reco::Track *track)
std::vector< TH1 * > myTrackHists1D
std::vector< TH1 * > myResidHitHists1DY
void fillRefTrajectory(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr)
void fillDerivatives(const TransientTrackingRecHit::ConstRecHitPointer &recHit, const float *localDerivs, unsigned int nLocal, const float *globalDerivs, unsigned int nGlobal, const int *labels)
std::vector< std::vector< TH1 * > > myResidHistsVec1DX
void fillResidualHitHists(const std::vector< TH1 * > &hists, float angle, float residuum, float sigma, unsigned int nHit)
T angle(T x1, T y1, T z1, T x2, T y2, T z2)