Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:09

0001 // Original Author: Gero Flucke
0002 // last change    : $Date: 2012/03/29 08:47:43 $
0003 // by             : $Author: flucke $
0004 #ifndef COMPAREMILLEPEDE_H
0005 #define COMPAREMILLEPEDE_H
0006 
0007 #include <TString.h>
0008 
0009 class PlotMillePede;
0010 class GFHistManager;
0011 
0012 class CompareMillePede
0013 {
0014  public:
0015   CompareMillePede(const char *fileName1, const char *fileName2, Int_t iov1 = 1, Int_t iov2 = 1,
0016            Int_t hieraLevel = 0);// iov1/2: which IOV ; hieraLev: -1 ignore, 0 lowest level, etc.
0017   virtual ~CompareMillePede();
0018 
0019   void DrawPedeParam(Option_t *option = "", unsigned int nNonRigidParam = 12);//"add": keep old canvas, "free1/2": if free param in file 1/2, "line": draw line in 2D plot 
0020   void DrawPedeParamVsLocation(Option_t *option = "", unsigned int nNonRigidParam = 12);//"add": keep old canvas, "free1/2": if free param in file 1/2 
0021 
0022   void DrawParam(Option_t *option="");//"add": keep old canvas, "free1/2": if free param in file 1/2 
0023   void DrawParamVsLocation(Option_t *option="");//"add": keep old canvas, "free1/2": if free param in file 1/2 
0024   void DrawParamDeltaMis(Option_t *option="");//"add": keep old canvas, "free1/2": if free param in file 1/2 
0025   void DrawParamDeltaMisVsLoc(Option_t *option="");//"add": keep old canvas, "free1/2": if free param in file 1/2
0026   void DrawNumHits(Option_t *opt="");//"add": keep old canvas
0027 
0028   void DrawAbsPos(Option_t *opt="");//"start": at start (else end), "add": keep old canvas
0029   void DrawSurfaceDeformations(Option_t *option="", UInt_t firstPar=0, UInt_t lastPar=11,
0030                    const TString &whichOne = "result"
0031                    ); //"add": keep old canvases, "limit": use GetMaxDev(), "noVs", noDiff"; "result"||"start"||"diff"
0032 
0033   bool IsConsistent(); // check correct order of alignables, if false draw some hists
0034   TString DeltaPar(UInt_t iPar) const; // par_2 - par_1
0035   TString DeltaParBySigma(UInt_t iPar, const PlotMillePede *sigmaSource) const;
0036   TString DeltaMisPar(UInt_t iPar) const; // abs(misalignment_2)-abs(misalignment_1)
0037   TString DeltaMisParBySigma(UInt_t iPar, const PlotMillePede *sigmaSource) const;
0038   TString DeltaPos(UInt_t iPos) const;
0039 
0040   void AddIsFreeSel(TString &sel, const TString &option, UInt_t iPar) const;
0041 
0042   void SetSubDetId(Int_t subDetId); // 1-6 are TPB, TPE, TIB, TID, TOB, TEC, -1 means: take all
0043   void AddSubDetId(Int_t subDetId); // 1-6 are TPB, TPE, TIB, TID, TOB, TEC
0044   void SetAlignableTypeId(Int_t alignableTypeId);//detunit=1,det=2,rod=3,etc. from AlignableObjectIdType (-1: all)
0045   void SetHieraLevel(Int_t hieraLevel); // select hierarchical level (-1: all)
0046   void AddAdditionalSel(const char *selection);// special select; StripDoubleOr1D,StripRphi,StripStereo
0047   void AddAdditionalSel(const TString &xyzrPhiNhit, Float_t min, Float_t max); // x,y,z,r,phi,Nhit
0048   //  const TString GetAdditionalSel () const { return fAdditionalSel;}
0049   void ClearAdditionalSel ();
0050   void SetSurfDefDeltaBows(bool deltaBows); // take care: problems for false if drawing 1-sensor modules!
0051 
0052   TString TitleAdd() const;
0053 
0054   PlotMillePede* GetPlotMillePede1() {return fPlotMp1;}
0055   PlotMillePede* GetPlotMillePede2() {return fPlotMp2;}
0056   GFHistManager* GetHistManager() { return fHistManager;}
0057 
0058   static const unsigned int kNpar; // number of parameters we have...
0059 
0060  private: 
0061   CompareMillePede() : fPlotMp1(0), fPlotMp2(0), fHistManager(0) {}
0062 
0063   Int_t PrepareAdd(bool addPlots);
0064 
0065   PlotMillePede *fPlotMp1;
0066   PlotMillePede *fPlotMp2;
0067 
0068   GFHistManager *fHistManager;
0069 };
0070 
0071 #endif