CMS 3D CMS Logo

NtupleManager.h

Go to the documentation of this file.
00001 //   COCOA class header file
00002 //Id:  NtupleManager.h
00003 //CAT: Analysis
00004 //
00005 //   History: v1.0 
00006 //   Luca Scodellaro
00007 
00008 #ifndef _NtupleManager_HH
00009 #define _NtupleManager_HH
00010 
00011 #include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
00012 #include "Alignment/CocoaFit/interface/MatrixMeschach.h"
00013 #include "Alignment/CocoaAnalysis/interface/NtupleObjects.h"
00014 #include "CLHEP/Vector/Rotation.h"
00015 
00016 class TFile;
00017 class TTree;
00018 class TClonesArray;
00019 
00020 class NtupleManager
00021 {
00022 
00023 public:
00024   //---------- Constructors / Destructor
00025   NtupleManager(){ };
00026   ~NtupleManager(){ };
00027   static NtupleManager* getInstance();  
00028   void BookNtuple();
00029   void InitNtuple();
00030   void FillNtupleTree();
00031   void WriteNtuple();
00032   void FillChi2();
00033   void FillFitParameters(MatrixMeschach* AtWAMatrix);
00034   void FillOptObjects(MatrixMeschach* AtWAMatrix);
00035   void FillMeasurements();
00036 
00037 
00038 private:
00039   static NtupleManager* instance;
00040 
00041   void GetGlobalAngles(const HepRotation& rmGlob, double *theta);
00042  
00043   TFile *theRootFile;
00044 
00045   TTree *CocoaTree;
00046 /*   TTree *FitParametersTree; */
00047 /*   TTree *MeasurementsTree; */
00048 
00049   TClonesArray* CloneFitParam;              FitParam              *FitParamA;
00050   TClonesArray* CloneOptObject;             OptObject             *OptObjectA;
00051   TClonesArray* CloneSensor2DMeas;          Sensor2DMeas          *Sensor2DMeasA;
00052   TClonesArray* CloneDistancemeterMeas;     DistancemeterMeas     *DistancemeterMeasA;
00053   TClonesArray* CloneDistancemeter1DimMeas; Distancemeter1DimMeas *Distancemeter1DimMeasA;
00054   TClonesArray* CloneTiltmeterMeas;         TiltmeterMeas         *TiltmeterMeasA;
00055   TClonesArray* CloneCopsMeas;              CopsMeas              *CopsMeasA;
00056 
00057 /*   bool BookFitParameters; */
00058 /*   bool BookMeasurements; */
00059 
00060   double Chi2Measurements, Chi2CalibratedParameters;
00061   int NDegreesOfFreedom;
00062   int NFitParameters;
00063   int NOptObjects;
00064   int NSensor2D;
00065   int NDistancemeter;
00066   int NDistancemeter1Dim;
00067   int NTiltmeter;
00068   int NCops;
00069 };
00070 
00071 #endif
00072 

Generated on Tue Jun 9 17:23:25 2009 for CMSSW by  doxygen 1.5.4