Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:34:25

0001 //   COCOA class header file
0002 //Id:  NtupleManager.h
0003 //CAT: Analysis
0004 //
0005 //   History: v1.0
0006 //   Luca Scodellaro
0007 
0008 #ifndef _NtupleManager_HH
0009 #define _NtupleManager_HH
0010 
0011 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
0012 #include "Alignment/CocoaFit/interface/MatrixMeschach.h"
0013 #include "Alignment/CocoaFit/interface/NtupleObjects.h"
0014 #include "CLHEP/Vector/Rotation.h"
0015 
0016 class TFile;
0017 class TTree;
0018 class TClonesArray;
0019 
0020 class NtupleManager {
0021 public:
0022   //---------- Constructors / Destructor
0023   NtupleManager() {}
0024   ~NtupleManager() {}
0025   static NtupleManager* getInstance();
0026   void BookNtuple();
0027   void InitNtuple();
0028   void FillNtupleTree();
0029   void WriteNtuple();
0030   void FillChi2();
0031   void FillFitParameters(MatrixMeschach* AtWAMatrix);
0032   void FillOptObjects(MatrixMeschach* AtWAMatrix);
0033   void FillMeasurements();
0034 
0035 private:
0036   static NtupleManager* instance;
0037 
0038   void GetGlobalAngles(const CLHEP::HepRotation& rmGlob, double* theta);
0039 
0040   TFile* theRootFile;
0041 
0042   TTree* CocoaTree;
0043   /*   TTree *FitParametersTree; */
0044   /*   TTree *MeasurementsTree; */
0045 
0046   TClonesArray* CloneFitParam;
0047   FitParam* FitParamA;
0048   TClonesArray* CloneOptObject;
0049   OptObject* OptObjectA;
0050   TClonesArray* CloneSensor2DMeas;
0051   Sensor2DMeas* Sensor2DMeasA;
0052   TClonesArray* CloneDistancemeterMeas;
0053   DistancemeterMeas* DistancemeterMeasA;
0054   TClonesArray* CloneDistancemeter1DimMeas;
0055   Distancemeter1DimMeas* Distancemeter1DimMeasA;
0056   TClonesArray* CloneTiltmeterMeas;
0057   TiltmeterMeas* TiltmeterMeasA;
0058   TClonesArray* CloneCopsMeas;
0059   CopsMeas* CopsMeasA;
0060 
0061   /*   bool BookFitParameters; */
0062   /*   bool BookMeasurements; */
0063 
0064   double Chi2Measurements, Chi2CalibratedParameters;
0065   int NDegreesOfFreedom;
0066   int NFitParameters;
0067   int NOptObjects;
0068   int NSensor2D;
0069   int NDistancemeter;
0070   int NDistancemeter1Dim;
0071   int NTiltmeter;
0072   int NCops;
0073 };
0074 
0075 #endif