diff --git a/Software/BiasVoltageScan/BiasVoltageScan.C b/Software/BiasVoltageScan/BiasVoltageScan.C index 894138e..cbddaac 100644 --- a/Software/BiasVoltageScan/BiasVoltageScan.C +++ b/Software/BiasVoltageScan/BiasVoltageScan.C @@ -4,7 +4,7 @@ //************************************************ /* -BiasVoltageScan reads all the ROOT files of a given bias voltage scan data taking, call FindStrip to find the Beetle channel corresponding to the strip hit by the laser, and creates a ROOT file with the following information: +BiasVoltageScan reads all the ROOT files of a given bias voltage scan data taking, calls FindStrip to find the Beetle channel corresponding to the strip hit by the laser, and creates a ROOT file with the following information: - a graph with the mean ADC count on the strip hit by the laser as a function of the bias voltage; - a graph with the mean of the sum of the ADC counts of four adjacent strips around that hit by the laser as a function of the bias voltage. diff --git a/Software/CheckAlignment/CheckAlignment.C b/Software/CheckAlignment/CheckAlignment.C new file mode 100644 index 0000000..2b49a48 --- /dev/null +++ b/Software/CheckAlignment/CheckAlignment.C @@ -0,0 +1,108 @@ +//************************************************ +// Author: Federica Lionetto +// Created on: 21/11/2014 +//************************************************ + +/* +CheckAlignment reads all the ROOT files of a given alignment data taking, calls FindStrip for each of them to find the Beetle channel corresponding to the strip hit by the laser, calculates the mean of the sum of the ADC counts of four adjacent strips around that hit by the laser as a function of the position along x (horizontal direction), and creates a ROOT file with the following information: +- a graph with the mean of the sum of the ADC counts of four adjacent strips around that hit by the laser as a function of the position along x. + +The alignment data taking is identified by the following information: +- , that is, the type of sensor (Hans410, ...); +- , that is, the filename excluding the position value and the run type. +- , that is, the first position along x; +- , that is, the last position along x; +- , that is, the step between two subsequent data acquisitions (1 step = 5 microns). + +Compile with: + +make + +Run with: + +./CheckAlignment [sensor] [filename] [firstx] [lastx] [stepx] [additional folder] + +For example: + +./CheckAlignment Hans410 20141121 0 75 3 Hans410/Alignment + +A folder named AnalysisResults will be created in a fixed location and a ROOT file will be saved in there. A folder named Figures will be created inside the folder named AnalysisResults, with some monitoring plots. + +If needed, an additional folder can be specified, that will be created inside the folder named AnalysisResults. +*/ + +#include "../Tools/Lib.C" +#include "../Tools/lhcbStyle.C" +#include "../Tools/Style.C" +#include "../Tools/Useful.C" + +#include "../Tools/FindStrip.C" +#include "../Tools/Par.C" + +void CheckAlignment(char *sensor, char *filename, int firstx, int lastx, int stepx, char *externalPath=0); + +int main(int argc, char *argv[]) +{ + getLHCbStyle(); + PersonalStyle(); + + if ((argc == 2) && (string(argv[1]) == "--info")) + { + cout << "**************************************************" << endl; + + cout << "Some comments." << endl; + + cout << "**************************************************" << endl; + + return 0; + } + else if (argc < 6) + { + cout << "**************************************************" << endl; + + cout << "Error! Arguments missing..." << endl; + cout << "Please use the following format:" << endl; + cout << "./CheckAlignment [1] [2] [3] [4] [5] [6]" << endl; + cout << "with:" << endl; + cout << "[1] = Type of sensor (Hans410, ...);" << endl; + cout << "[2] = Filename, excluding the position value and the run type;" << endl; + cout << "[3] = First position along x;" << endl; + cout << "[4] = Last position along x" << endl; + cout << "[5] = Step between two subsequent data acquisitions (1 step = 5 microns);" << endl; + cout << "[6] = Additional folder, optional." << endl; + cout << "Type ./CheckAlignment --info for more information." << endl; + + cout << "**************************************************" << endl; + + return 0; + } + else + { + cout << "Type of sensor: " << argv[1] << endl; + cout << "Filename: " << argv[2] << endl; + cout << "First position along x: " << argv[3] << endl; + cout << "Last position along x: " << argv[4] << endl; + cout << "Step between two subsequent data acquisitions: " << argv[5] << endl; + if (argc == 6) + CheckAlignment(argv[1],argv[2],argv[3],argv[4],argv[5]); + else if (argc == 7) + CheckAlignment(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6]); + else + { + cout << "Error! Too many arguments given..." << endl; + + return 0; + } + + return 0; + } +} + +void CheckAlignment(char *sensor, char *filename, int firstx, int lastx, int stepx, char *externalPath) +{ + cout << "**************************************************" << endl; + cout << "Checking alignment..." << endl; + cout << "**************************************************" << endl; + + return; +} diff --git a/Software/CheckAlignment/Makefile b/Software/CheckAlignment/Makefile new file mode 100755 index 0000000..45b531c --- /dev/null +++ b/Software/CheckAlignment/Makefile @@ -0,0 +1,34 @@ +# +CC=$(CXX) +glib_cflags=$(shell pkg-config --cflags glib-2.0 gio-2.0) +glib_libs=$(shell pkg-config --libs glib-2.0 gio-2.0) + +ROOTC=$(shell root-config --cflags) +ROOTL=$(shell root-config --libs) +OPT=-g -fno-inline #-std=c++11 +CppFLAGS=$(OPT) -I. $(glib_cflags) +CXXFLAGS=-fPIC $(CppFLAGS) + + +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Linux) + SO=so + SO_FLAGS=-shared + CXXFLAGS += -D LINUX +endif +ifeq ($(UNAME_S),Darwin) + SO=dylib + SO_FLAGS=-dynamiclib -undefined dynamic_lookup -install_name @rpath/$@ + CXXFLAGS += -D OSX +endif + +all: CheckAlignment + +CheckAlignment: CheckAlignment.C + c++ -I$(OPT) $(CXXFLAGS) $(ROOTC) -o $@ $^ $(LDLIBS) $(ROOTL) $(gliblibs) + + +clean: + rm -f *.o CheckAlignment + rm -rf *.dSYM + diff --git a/Software/LaserDelayScan/LaserDelayScan b/Software/LaserDelayScan/LaserDelayScan deleted file mode 100755 index 02bfaa5..0000000 --- a/Software/LaserDelayScan/LaserDelayScan +++ /dev/null Binary files differ