| Last change
 on this file since 14754 was             14751, checked in by Jens Buss, 13 years ago | 
        
          | add shift in X functions, improved shifting | 
        
          | File size:
            4.3 KB | 
      
      
| Line |  | 
|---|
| 1 | #ifndef TEMPLATEEXTRACTORS_H | 
|---|
| 2 | #define TEMPLATEEXTRACTORS_H | 
|---|
| 3 |  | 
|---|
| 4 | #include <TROOT.h> | 
|---|
| 5 | #include <TMath.h> | 
|---|
| 6 | #include <TProfile.h> | 
|---|
| 7 | #include <TH2F.h> | 
|---|
| 8 | #include <TH1I.h> | 
|---|
| 9 | #include <TH1F.h> | 
|---|
| 10 | #include <TF1.h> | 
|---|
| 11 | #include <TString.h> | 
|---|
| 12 | #include <TSystem.h> | 
|---|
| 13 |  | 
|---|
| 14 | #include "pixel.h" | 
|---|
| 15 | #include "Sample.h" | 
|---|
| 16 |  | 
|---|
| 17 | /** Assignment operator. | 
|---|
| 18 | * @todo do me | 
|---|
| 19 | * @warning not implemented | 
|---|
| 20 | * @param from THe value to assign to this object. | 
|---|
| 21 | * | 
|---|
| 22 | * @return A reference to this object. | 
|---|
| 23 | */ | 
|---|
| 24 |  | 
|---|
| 25 | /** CalcMaxPropabilityOfSlice( | 
|---|
| 26 | TH2*            inputHisto, | 
|---|
| 27 | TH1*            outputHisto, | 
|---|
| 28 | int             verbosityLevel | 
|---|
| 29 | ); | 
|---|
| 30 | * Generates a Y-Projection for each slice of a TH2 histogram | 
|---|
| 31 | * Then calls the Value of the bin with Maximum Value and puts it | 
|---|
| 32 | * into the corresponding bin of a TH1 histogram | 
|---|
| 33 | * @see Event::CalibrateAllPixel() | 
|---|
| 34 | * @see Event::CalculatePhotonCharge() | 
|---|
| 35 | */ | 
|---|
| 36 | void | 
|---|
| 37 | CalcMaxPropabilityOfSlice( | 
|---|
| 38 | TH2*            inputHisto, | 
|---|
| 39 | TH1*            outputHisto, | 
|---|
| 40 | int             verbosityLevel | 
|---|
| 41 | ); | 
|---|
| 42 |  | 
|---|
| 43 | void | 
|---|
| 44 | PlotMaxPropabilityPulse( | 
|---|
| 45 | Pixel*          CurrentPixel, | 
|---|
| 46 | TString         overlayType, | 
|---|
| 47 | int             verbosityLevel | 
|---|
| 48 | ); | 
|---|
| 49 |  | 
|---|
| 50 | void | 
|---|
| 51 | FitMaxPropabilityPulse( | 
|---|
| 52 | TH1F*           inputHisto, | 
|---|
| 53 | int             verbosityLevel | 
|---|
| 54 | ); | 
|---|
| 55 |  | 
|---|
| 56 | Double_t MedianOfH1 ( | 
|---|
| 57 | TH1*            inputHisto | 
|---|
| 58 | ); | 
|---|
| 59 |  | 
|---|
| 60 | double | 
|---|
| 61 | ErrorMedianOfH1( | 
|---|
| 62 | TH1*        inputHisto, | 
|---|
| 63 | int         numIterations, | 
|---|
| 64 | int         verbosityLevel | 
|---|
| 65 | ); | 
|---|
| 66 |  | 
|---|
| 67 | Double_t MedianOfH1withRndSlices ( | 
|---|
| 68 | TH1*            inputHisto,     //histogram from which median will be calculated | 
|---|
| 69 | vector<int>     *position        //array with random slice numbers | 
|---|
| 70 | ); | 
|---|
| 71 |  | 
|---|
| 72 | int ExtractTH1EnriesToVector ( | 
|---|
| 73 | TH1*            inputHisto,     //histogram from which median will be calculated | 
|---|
| 74 | vector<int>     *entries        //array with random slice numbers | 
|---|
| 75 | ); | 
|---|
| 76 |  | 
|---|
| 77 | void CalculateErrorsWithBootstrapping( | 
|---|
| 78 | TH1* inputHisto, | 
|---|
| 79 | int numIt, | 
|---|
| 80 | double* par, | 
|---|
| 81 | double* parErr | 
|---|
| 82 | ); | 
|---|
| 83 |  | 
|---|
| 84 | void | 
|---|
| 85 | PlotMedianOfSlice( | 
|---|
| 86 | Pixel*          CurrentPixel, | 
|---|
| 87 | TString         overlayType, | 
|---|
| 88 | int             verbosityLevel | 
|---|
| 89 | ); | 
|---|
| 90 |  | 
|---|
| 91 | void | 
|---|
| 92 | PlotMeanOfSlice( | 
|---|
| 93 | Pixel*          CurrentPixel, | 
|---|
| 94 | TString         overlayType, | 
|---|
| 95 | int             verbosityLevel | 
|---|
| 96 | ); | 
|---|
| 97 |  | 
|---|
| 98 | void | 
|---|
| 99 | MedianOfTH2Slices( | 
|---|
| 100 | TH2*        inputHisto, | 
|---|
| 101 | TH1*        outputHisto, | 
|---|
| 102 | int         verbosityLevel | 
|---|
| 103 | ); | 
|---|
| 104 |  | 
|---|
| 105 | void | 
|---|
| 106 | ErrorMedianOfTH2Slices( | 
|---|
| 107 | TH2*        inputHisto, | 
|---|
| 108 | TH1*        outputHisto, | 
|---|
| 109 | int         numIterations, | 
|---|
| 110 | int         verbosityLevel | 
|---|
| 111 | ); | 
|---|
| 112 |  | 
|---|
| 113 | void | 
|---|
| 114 | ExtractPulseTemplate( | 
|---|
| 115 | Pixel*          CurrentPixel, | 
|---|
| 116 | TString         overlayType, | 
|---|
| 117 | int             order, | 
|---|
| 118 | int             verbosityLevel | 
|---|
| 119 | ); | 
|---|
| 120 |  | 
|---|
| 121 | bool | 
|---|
| 122 | WritePixelTemplateToCsv( | 
|---|
| 123 | Pixel*          CurrentPixel, | 
|---|
| 124 | TString         path, | 
|---|
| 125 | TString         overlayMethod, | 
|---|
| 126 | int             order, | 
|---|
| 127 | int             verbosityLevel | 
|---|
| 128 | ); | 
|---|
| 129 |  | 
|---|
| 130 | //void | 
|---|
| 131 | //FitMaxPropabilityPuls( | 
|---|
| 132 | //        TH1F*           hMaximumTemp, | 
|---|
| 133 | //        int             verbosityLevel | 
|---|
| 134 | //        ); | 
|---|
| 135 |  | 
|---|
| 136 | //double | 
|---|
| 137 | //PolExp( | 
|---|
| 138 | //        double*         x, | 
|---|
| 139 | //        double*         par | 
|---|
| 140 | //        ); | 
|---|
| 141 |  | 
|---|
| 142 | //void | 
|---|
| 143 | //FitFallingEdge( | 
|---|
| 144 | //        TString         name, | 
|---|
| 145 | //        TH1F*           histo, | 
|---|
| 146 | //        double          xMin, | 
|---|
| 147 | //        double          xMax, | 
|---|
| 148 | //        double*         parameters | 
|---|
| 149 | //        ); | 
|---|
| 150 |  | 
|---|
| 151 | //double | 
|---|
| 152 | //template_function( | 
|---|
| 153 | //        double*         input_x, | 
|---|
| 154 | //        double*         par); | 
|---|
| 155 |  | 
|---|
| 156 | //double | 
|---|
| 157 | //NegPolExp( | 
|---|
| 158 | //        double*         x, | 
|---|
| 159 | //        double*         par | 
|---|
| 160 | //        ); | 
|---|
| 161 |  | 
|---|
| 162 | //void | 
|---|
| 163 | //FitRisingEdge( | 
|---|
| 164 | //        TString         name, | 
|---|
| 165 | //        TH1F*           histo, | 
|---|
| 166 | //        double          xMin, | 
|---|
| 167 | //        double          xMax, | 
|---|
| 168 | //        double*         parameters | 
|---|
| 169 | //        ); | 
|---|
| 170 |  | 
|---|
| 171 | //double | 
|---|
| 172 | //ChargeDiode( | 
|---|
| 173 | //        double          time, | 
|---|
| 174 | //        double          chargeVoltage, | 
|---|
| 175 | //        double          impedance, | 
|---|
| 176 | //        double          capacity | 
|---|
| 177 | //        ); | 
|---|
| 178 |  | 
|---|
| 179 | //double | 
|---|
| 180 | //UnChargeDiode( | 
|---|
| 181 | //        double*         time, | 
|---|
| 182 | //        double*         chargeVoltage, | 
|---|
| 183 | //        double*         timeConstant | 
|---|
| 184 | //        ); | 
|---|
| 185 |  | 
|---|
| 186 | void ShiftHistoInX( | 
|---|
| 187 | TH1*                histo, | 
|---|
| 188 | float               shift | 
|---|
| 189 | ); | 
|---|
| 190 | void ShiftStartOfHistoInXTo( | 
|---|
| 191 | TH1*                histo, | 
|---|
| 192 | float               value | 
|---|
| 193 | ); | 
|---|
| 194 |  | 
|---|
| 195 | #endif // TEMPLATEEXTRACTORS_H | 
|---|
| 196 |  | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.