Changeset 13535
- Timestamp:
- 05/03/12 10:39:01 (13 years ago)
- Location:
- fact/tools/rootmacros
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/DrsCalibration.C
r13534 r13535 2 2 3 3 #include <iostream> 4 using namespace std; 5 4 6 float getValue( int slice, int pixel, 5 7 vector<float> &drs_basemean, 6 8 vector<float> &drs_gainmean, 7 9 vector<float> &drs_triggeroffsetmean, 8 UInt_tRegionOfInterest,10 unsigned int RegionOfInterest, 9 11 vector<int16_t> AllPixelDataVector, 10 12 vector<int16_t> StartCellVector … … 56 58 vector<float> &drs_gainmean, 57 59 vector<float> &drs_triggeroffsetmean, 58 UInt_t RegionOfInterest,60 unsigned int RegionOfInterest, 59 61 vector<int16_t> AllPixelDataVector, 60 62 vector<int16_t> StartCellVector, -
fact/tools/rootmacros/DrsCalibration.h
r13534 r13535 6 6 7 7 float getValue( int slice, int pixel, 8 9 10 11 UInt_t RegionOfInterest,12 13 8 std::vector<float> &drs_basemean, 9 std::vector<float> &drs_gainmean, 10 std::vector<float> &drs_triggeroffsetmean, 11 unsigned int RegionOfInterest, 12 std::vector<int16_t> AllPixelDataVector, 13 std::vector<int16_t> StartCellVector 14 14 ); 15 15 16 size_t applyDrsCalibration( vector<float> &destination, 17 int pixel, 18 int LeaveOutLeft, 19 int LeaveOutRight, 20 vector<float> &drs_basemean, 21 vector<float> &drs_gainmean, 22 vector<float> &drs_triggeroffsetmean, 23 UInt_t RegionOfInterest, 24 vector<int16_t> AllPixelDataVector, 25 vector<int16_t> StartCellVector, 26 int verbosityLevel = 1 16 size_t applyDrsCalibration( 17 std::vector<float> &destination, 18 int pixel, 19 int LeaveOutLeft, 20 int LeaveOutRight, 21 std::vector<float> &drs_basemean, 22 std::vector<float> &drs_gainmean, 23 std::vector<float> &drs_triggeroffsetmean, 24 unsigned int RegionOfInterest, 25 std::vector<int16_t> AllPixelDataVector, 26 std::vector<int16_t> StartCellVector, 27 int verbosityLevel = 1 27 28 ); 28 29 -
fact/tools/rootmacros/PulseTemplates/Makefile
r13522 r13535 1 all: 2 g++ -o pulseoverlay FPulseOverlay.C -I`root-config --incdir` `root-config --glibs` 1 CXXFLAGS = -I`root-config --incdir` `root-config --glibs` -Wall -g 2 CC = g++ 3 RM = rm 4 5 OBJ = openFits.o discriminator.o zerosearch.o factfir.o \ 6 DrsCalibration.o SpikeRemoval.o rootfilehandler.o pixel.o 7 8 BINNAME = pulseoverlay 9 10 $(BINNAME): $(OBJ) 11 $(CC) $(CXXFLAGS) FPulseOverlay.C $(OBJ) -o $@ 12 13 openFits.o : ../openFits.c ../openFits.h ../fits.h ../izstream.h 14 $(CC) $(CXXFLAGS) -c $< -o $@ 15 16 discriminator.o : ../discriminator.C ../discriminator.h 17 $(CC) $(CXXFLAGS) -c $< -o $@ 18 19 zerosearch.o : ../zerosearch.C ../zerosearch.h 20 $(CC) $(CXXFLAGS) -c $< -o $@ 21 22 factfir.o : ../factfir.C ../factfir.h 23 $(CC) $(CXXFLAGS) -c $< -o $@ 24 25 DrsCalibration.o : ../DrsCalibration.C ../DrsCalibration.h 26 $(CC) $(CXXFLAGS) -c $< -o $@ 27 28 SpikeRemoval.o : ../SpikeRemoval.C ../SpikeRemoval.h 29 $(CC) $(CXXFLAGS) -c $< -o $@ 30 31 rootfilehandler.o : rootfilehandler.C rootfilehandler.h 32 $(CC) $(CXXFLAGS) -c $< -o $@ 33 34 pixel.o : pixel.C pixel.h 35 $(CC) $(CXXFLAGS) -c $< -o $@ 36 37 all: $(BINNAME) 38 3 39 clean: 4 rm main40 $(RM) *.o -
fact/tools/rootmacros/PulseTemplates/rootfilehandler.C
r13534 r13535 3 3 4 4 #include "rootfilehandler.h" 5 5 #include <stdlib.h> 6 6 using namespace std; 7 7 -
fact/tools/rootmacros/SpikeRemoval.C
r13534 r13535 2 2 3 3 #include <iostream> 4 using namespace std; 4 5 5 6 // compute the mean of the left and right neighbors of a channel -
fact/tools/rootmacros/SpikeRemoval.h
r13534 r13535 4 4 #include <vector> 5 5 6 vector<float> * computeN1mean(vector<float> &src);6 std::vector<float> * computeN1mean( std::vector<float> &src); 7 7 8 8 void removeSpikes( 9 vector<float> &src,10 vector<float> &dest,9 std::vector<float> &src, 10 std::vector<float> &dest, 11 11 const float CandidateTHR = -5.0, 12 12 const float nextDiffTHR = -1.6, -
fact/tools/rootmacros/factfir.C
r13534 r13535 1 #include <vector> 1 2 2 #include <deque> 3 3 #include "factfir.h" 4 5 using namespace std; 6 4 7 // source vector is 5 8 void factfir(double b, vector<double> &a, int k, vector<float> &source, vector<float> &dest){ -
fact/tools/rootmacros/factfir.h
r13534 r13535 2 2 #define __FACTFIR_H 3 3 4 #include <vector> 5 6 4 7 void factfir( 5 8 double b, 6 vector<double> &a,9 std::vector<double> &a, 7 10 int k, 8 vector<float> &source,9 vector<float> &dest);11 std::vector<float> &source, 12 std::vector<float> &dest); 10 13 11 14 void sliding_avg( 12 vector<float> &source,13 vector<float> &dest,15 std::vector<float> &source, 16 std::vector<float> &dest, 14 17 unsigned int HalfWidth); 15 18 #endif // __FACTFIR_H -
fact/tools/rootmacros/izstream.h
r12255 r13535 15 15 #else 16 16 #include <zlib.h> 17 #include "string.h" 18 #include <stdio.h> 17 19 #endif 18 20 -
fact/tools/rootmacros/openFits.c
r13534 r13535 3 3 #include "stdint.h" 4 4 5 5 using namespace std; 6 6 7 7 // Opens FACT Fits Raw Data -- for more Info refer to header file … … 12 12 vector<int16_t> &StartCells, // vector, which will be filled with DRS start positions 13 13 unsigned int &EventID, // index of the current event 14 UInt_t &RegionOfInterest, // Width of the Region, read out of the DRS15 UInt_t &NumberOfPixels, // Total number of pixel, read out of the camera14 unsigned int &RegionOfInterest, // Width of the Region, read out of the DRS 15 unsigned int &NumberOfPixels, // Total number of pixel, read out of the camera 16 16 size_t &PXLxROI, // Size of column "Data" = #Pixel x ROI 17 17 // this can be used, to x-check RegionOfInterest and NumberOfPixels -
fact/tools/rootmacros/openFits.h
r13534 r13535 6 6 #include <cstdio> 7 7 #include "stdint.h" 8 #include <vector> 8 9 9 10 size_t openDataFits( 10 11 const char *datafilename, // path to fits file containing FACT raw data 11 fits * * datafile, // ptr to pointer, where to return the fits object12 vector<int16_t> &Data, // vector, which will be filled with raw data13 vector<int16_t> &StartCells, // vector, which will be filled with DRS start positions12 std::fits * * datafile, // ptr to pointer, where to return the fits object 13 std::vector<int16_t> &Data, // vector, which will be filled with raw data 14 std::vector<int16_t> &StartCells, // vector, which will be filled with DRS start positions 14 15 unsigned int &EventID, // index of the current event 15 UInt_t &RegionOfInterest, // Width of the Region, read out of the DRS16 UInt_t &NumberOfPixels, // Total number of pixel, read out of the camera16 unsigned int &RegionOfInterest, // Width of the Region, read out of the DRS 17 unsigned int &NumberOfPixels, // Total number of pixel, read out of the camera 17 18 size_t &PXLxROI, // Size of column "Data" = #Pixel x ROI 18 19 // this can be used, to x-check RegionOfInterest and NumberOfPixels … … 22 23 size_t openCalibFits( 23 24 const char *FileName, // path to fits file 24 vector<float> &Offset,25 vector<float> &Gain,26 vector<float> &TriggerOffset,25 std::vector<float> &Offset, 26 std::vector<float> &Gain, 27 std::vector<float> &TriggerOffset, 27 28 size_t &TriggerOffsetROI, 28 29 int VerbosityLevel =0 -
fact/tools/rootmacros/zerosearch.C
r13534 r13535 1 1 #include "Region.h" 2 2 #include <iostream> 3 #include <vector>4 3 5 4 #include "zerosearch.h" 5 6 using namespace std; 6 7 7 8 // searches for zero crossings in a given vector of floats -
fact/tools/rootmacros/zerosearch.h
r13424 r13535 4 4 5 5 #include "Region.h" 6 #include <vector> 6 7 7 vector<Region> *zerosearch(8 vector<float> &input,8 std::vector<Region> *zerosearch( 9 std::vector<float> &input, 9 10 int edge = 1, // search for transitions on rising edge=1, -1:falling 10 11 unsigned int step = 4, // search in steps of step … … 12 13 ); 13 14 14 size_t ShiftRegionBy(vector<Region> &src, 15 size_t ShiftRegionBy( 16 std::vector<Region> &src, 15 17 int Shift, 16 18 int VerbosityLevel=0); 17 19 18 size_t EnlargeRegion( vector<Region> &src,20 size_t EnlargeRegion(std::vector<Region> &src, 19 21 int Left, 20 22 int Right, … … 22 24 23 25 size_t findAbsMaxInRegions( 24 vector<Region> ®ions,25 vector<float> &data,26 std::vector<Region> ®ions, 27 std::vector<float> &data, 26 28 int VerbosityLevel=0); 27 29 … … 29 31 30 32 size_t removeEqualMaxima( 31 vector<Region> ®ions,33 std::vector<Region> ®ions, 32 34 int VerbosityLevel=0); 33 35 34 36 size_t removeRegionOnFallingEdge( 35 vector<Region> ®ions,37 std::vector<Region> ®ions, 36 38 unsigned int FallingEdgeWidth = 100, 37 39 int VerbosityLevel=0); … … 39 41 40 42 size_t removeRegionWithMaxOnEdge( 41 vector<Region> ®ions,43 std::vector<Region> ®ions, 42 44 unsigned int EdgeWidth=3, 43 45 int VerbosityLevel=0); 44 46 45 47 size_t removeMaximaBelow( 46 vector<Region> ®ions,48 std::vector<Region> ®ions, 47 49 float threshold = 2.0, 48 50 int VerbosityLevel=0); 49 51 50 52 size_t removeMaximaAbove( 51 vector<Region> ®ions,53 std::vector<Region> ®ions, 52 54 float threshold= 14.0, 53 55 int VerbosityLevel=0); 54 56 55 57 Region FindAbsMax( 56 vector<Region> ®ions,58 std::vector<Region> ®ions, 57 59 int VerbosityLevel=0); 58 60 59 61 size_t findTimeOfHalfMaxLeft( 60 vector<Region> ®ions,61 vector<float> &data,62 std::vector<Region> ®ions, 63 std::vector<float> &data, 62 64 float baseline = -0.5, 63 65 int beginRisingEdge = 5,
Note:
See TracChangeset
for help on using the changeset viewer.