Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Susypat test #100

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
48 changes: 0 additions & 48 deletions Alignment/CocoaAnalysis/doc/CocoaAnalysis.doc

This file was deleted.

45 changes: 45 additions & 0 deletions Alignment/CocoaAnalysis/interface/FittedEntriesManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// COCOA class header file
//Id: FittedEntriesManager.h
//CAT: Model
//
// Class to manage the sets of fitted entries (one set per each measurement data set)
//
// History: v1.0
// Pedro Arce

#ifndef _FittedEntriesManager_HH
#define _FittedEntriesManager_HH

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include "Alignment/CocoaAnalysis/interface/FittedEntriesSet.h"


class FittedEntriesManager
{

public:
//---------- Constructors / Destructor
FittedEntriesManager(){ };
~FittedEntriesManager(){ };
static FittedEntriesManager* getInstance();
void AddFittedEntriesSet( FittedEntriesSet* fents);
void MakeHistos();

public:
std::vector< FittedEntriesSet* > getFittedEntriesSets() const {
return theFittedEntriesSets; }

private:
ALIstring createFileName( const ALIstring& optoName, const ALIstring& entryName);
void dumpEntriesSubstraction( std::ofstream& fout, FittedEntriesSet& fes, ALIint order1, ALIint order2 );

private:
static FittedEntriesManager* instance;
std::vector< FittedEntriesSet* > theFittedEntriesSets;

void GetDifferentBetweenLasers();

};

#endif

67 changes: 67 additions & 0 deletions Alignment/CocoaAnalysis/interface/FittedEntriesSet.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// COCOA class header file
//Id: FittedEntriesSet.h
//CAT: Model
//
// Class to store set of fitted entries with date
//
// History: v1.0
// Pedro Arce

#ifndef _FittedEntriesSet_HH
#define _FittedEntriesSet_HH

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include "time.h"
#include <vector>
#include "Alignment/CocoaAnalysis/interface/FittedEntry.h"
//#ifdef MAT_MESCHACH
#include "Alignment/CocoaFit/interface/MatrixMeschach.h"
//typedef MatrixMeschach ALIMatrix;
//#endif

class FittedEntriesSet
{

public:
//---------- Constructors / Destructor
FittedEntriesSet( MatrixMeschach* AtWAMatrix );
FittedEntriesSet( std::vector<ALIstring> wl );
//---- Average a list of FittedEntriesSet's
FittedEntriesSet( std::vector<FittedEntriesSet*> vSets );
~FittedEntriesSet(){ };
void Fill();
void FillEntries();
void FillCorrelations();
void CreateCorrelationMatrix( const ALIuint nent );
void FillEntriesFromFile( std::vector<ALIstring> wl);
void FillEntriesAveragingSets( std::vector<FittedEntriesSet*> vSets );

void SetOptOEntries();

public:
std::vector< FittedEntry* >& FittedEntries(){
return theFittedEntries;
}

//GET AND SET METHODS
ALIstring& getDate() {
return theDate;
}
ALIstring& getTime() {
return theTime;
}

public:

std::vector< FittedEntry* > theFittedEntries;
private:
//t struct tm theTime;
ALIstring theDate;
ALIstring theTime;
std::vector< std::vector<ALIdouble> > theCorrelationMatrix;
ALIint theMinEntryQuality;
MatrixMeschach* theEntriesErrorMatrix;
};

#endif

77 changes: 77 additions & 0 deletions Alignment/CocoaAnalysis/interface/FittedEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// COCOA class header file
//Id: FittedEntry.h
//CAT: Model
//
// Class to store the data of a fitted entry (only those of quality 'unk')
//
// History: v1.0
// Pedro Arce

#ifndef FittedEntry_HH
#define FittedEntry_HH

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include <vector>
class Entry;

class FittedEntry
{

public:
//---------- Constructors / Destructor
FittedEntry(){ };
FittedEntry( Entry* entry, ALIint order, ALIdouble sigma);
FittedEntry( ALIstring name, float value, float sigma);
FittedEntry( std::vector<FittedEntry*> vFEntry );
~FittedEntry(){ };

void BuildName();

ALIstring getOptOName() const {
return theOptOName;
}
ALIstring getEntryName() const {
return theEntryName;
}
ALIstring getName() const {
return theName;
}
ALIdouble getValue() const {
return theValue;
}
ALIdouble getSigma() const {
return theSigma;
}
ALIdouble getOrigValue() const {
return theOrigValue;
}
ALIdouble getOrigSigma() const {
return theOrigSigma;
}
ALIint getOrder() const {
return theOrder;
}
ALIint getQuality() const {
return theQuality;
}
Entry* getEntry() const {
return theEntry;
}


private:
ALIdouble theValue;
Entry* theEntry;
ALIint theOrder;
ALIstring theName;
ALIstring theOptOName;
ALIstring theEntryName;
ALIdouble theSigma;
ALIdouble theOrigValue;
ALIdouble theOrigSigma;
ALIint theQuality;

};

#endif

72 changes: 72 additions & 0 deletions Alignment/CocoaAnalysis/interface/NtupleManager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// COCOA class header file
//Id: NtupleManager.h
//CAT: Analysis
//
// History: v1.0
// Luca Scodellaro

#ifndef _NtupleManager_HH
#define _NtupleManager_HH

#include "Alignment/CocoaUtilities/interface/CocoaGlobals.h"
#include "Alignment/CocoaFit/interface/MatrixMeschach.h"
#include "Alignment/CocoaAnalysis/interface/NtupleObjects.h"
#include "CLHEP/Vector/Rotation.h"

class TFile;
class TTree;
class TClonesArray;

class NtupleManager
{

public:
//---------- Constructors / Destructor
NtupleManager(){ };
~NtupleManager(){ };
static NtupleManager* getInstance();
void BookNtuple();
void InitNtuple();
void FillNtupleTree();
void WriteNtuple();
void FillChi2();
void FillFitParameters(MatrixMeschach* AtWAMatrix);
void FillOptObjects(MatrixMeschach* AtWAMatrix);
void FillMeasurements();


private:
static NtupleManager* instance;

void GetGlobalAngles(const CLHEP::HepRotation& rmGlob, double *theta);

TFile *theRootFile;

TTree *CocoaTree;
/* TTree *FitParametersTree; */
/* TTree *MeasurementsTree; */

TClonesArray* CloneFitParam; FitParam *FitParamA;
TClonesArray* CloneOptObject; OptObject *OptObjectA;
TClonesArray* CloneSensor2DMeas; Sensor2DMeas *Sensor2DMeasA;
TClonesArray* CloneDistancemeterMeas; DistancemeterMeas *DistancemeterMeasA;
TClonesArray* CloneDistancemeter1DimMeas; Distancemeter1DimMeas *Distancemeter1DimMeasA;
TClonesArray* CloneTiltmeterMeas; TiltmeterMeas *TiltmeterMeasA;
TClonesArray* CloneCopsMeas; CopsMeas *CopsMeasA;

/* bool BookFitParameters; */
/* bool BookMeasurements; */

double Chi2Measurements, Chi2CalibratedParameters;
int NDegreesOfFreedom;
int NFitParameters;
int NOptObjects;
int NSensor2D;
int NDistancemeter;
int NDistancemeter1Dim;
int NTiltmeter;
int NCops;
};

#endif

Loading