Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:57

0001 #ifndef HIPPLOTS_H
0002 #define HIPPLOTS_H
0003 
0004 #include <Riostream.h>
0005 #include <vector>
0006 #include <string>
0007 //#include <stdio.h>
0008 #include "TFile.h"
0009 #include "TH2F.h"
0010 #include "TChain.h"
0011 #include "TString.h"
0012 #include "TCanvas.h"
0013 #include "TFileIter.h"
0014 #include "TStyle.h"
0015 #include "TMath.h"
0016 #include "TCut.h"
0017 #include "TGraph.h"
0018 
0019 class HIPplots{
0020 public:
0021   HIPplots(int IOV, char* path, char* outFile);
0022   void extractAlignParams(int i, int minHits = 0, int subDet = 0, int doubleSided = 0);
0023   void extractAlignShifts(int i, int minHits = 0, int subDet = 0);
0024   void plotAlignParams(string ShiftsOrParams, char* plotName = "test.png");
0025   void plotAlignParamsAtIter(int iter, string ShiftsOrParams, char* plotName = "test.png");
0026   void plotHitMap(char *outpath, int subDet, int minHits=0);
0027   void extractAlignableChiSquare(int minHits=0, int subDet =0, int doubleSided = 0);
0028   void plotAlignableChiSquare(char *plotName ="testchi2.png", float minChi2n=-1.0);
0029   void extractSurveyResiduals(int currentPar, int subDet =0);
0030   void dumpAlignedModules(int nhits=0);
0031 
0032   int _IOV;
0033   TString _path;
0034   TString _outFile;
0035   TString _inFile_params;
0036   TString _inFile_uservars;
0037   TString _inFile_truepos;
0038   TString _inFile_alipos;
0039   TString _inFile_mispos;
0040   TString _inFile_HIPalign;
0041   TString _inFile_surveys;
0042   enum TKdetector_id{ unknown=0, TPBid=1, TPEid=2, TIBid=3, TIDid=4, TOBid=5, TECid=6, ALLid=99 };
0043   TLegend * MakeLegend(double x1=0.1, double y1=0.1, double x2=0.1, double y2=0.1);
0044   int GetNIterations(TDirectory *f, char *tag, int startingcounter=0);
0045   int GetSubDet(unsigned int id);
0046   int GetBarrelLayer(unsigned int id);
0047   void SetMinMax(TH1* h);
0048   int FindPeaks(TH1F *h1, float *peaklist, const int maxNpeaks, int startbin=-1, int endbin=-1);
0049   void SetPeakThreshold(float newpeakthreshold);
0050   void CheckFiles(int &ierr);
0051   bool CheckFileExistence(TString filename);
0052   bool CheckHistoRising(TH1D *h);
0053   float peakthreshold;
0054   bool plotbadchi2;
0055 };
0056 
0057 #endif