Changeset 14941
- Timestamp:
- 02/21/13 14:01:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/rootmacros/PulseTemplates/FPulseOverlay_filelist.C
r14809 r14941 211 211 //---------------------------------------------------------------------------- 212 212 int FPulseOverlay_filelist( 213 //---------------{Process Files}--------------- 213 214 TString inputPath = "raw/2012/08/02/", 214 TString sequenzFileName = "/home_nfs/isdc/jbbuss/analysis/pulseShape/lists/20120802templ_vs_0mV.csv", 215 // int firstRunId = 18, 215 TString sequenzFileName = "/home_nfs/isdc/jbbuss/analysis/pulseShape/lists/20120802templ_vs_100mV.csv", 216 TString OutputPath = "analysis/PulsTemplateAnalysis/20120802/", 217 TString OutRootFileName = "20120802_100mV_Stacking_G12B-2AWW8.root", 218 //---------------{Process parameters}--------------- 216 219 int nRuns = -1, 217 // TString drsfilename = "20120309_012.drs.fits.gz",218 TString OutputPath = "analysis/pulseShape/",219 TString OutRootFileName = "20120802_0mV_newSelectAlg.root",220 220 int firstevent = 1, // Hast to be between 1 and infinity NOT 0!!!! 221 221 int nevents = -1, 222 222 int firstpixel = 0, 223 int npixel = 1,223 int npixel = -1, 224 224 int pixelSetSize = 150, 225 225 int maxPulseOrder = 6, 226 int verbosityLevel = 0, // different verbosity levels can be implemented here226 //---------------{stacking parameters}--------------- 227 227 TString histoOptions = "SRM", 228 int AmplWindowWidth = 7, //Width of Window for selection of pulses to histograms229 float GainMean = 1 1,228 int AmplWindowWidth = 8, //Width of Window for selection of pulses to histograms 229 float GainMean = 12, 230 230 float BSLMean = -2, //4 Histogramms will be drawn, decide how far pulsehights differ from eachother 231 231 int avg1 = 8, 232 232 int avg2 = 8, 233 int OverlayWindowLeft = 10 24,233 int OverlayWindowLeft = 100, 234 234 int OverlayWindowRight = 1024, 235 236 // pulses within this distance behind pulse max will be discarted 237 int beginRisingEdge = 5, 238 int endRisingEdge = 10, 239 240 // pulses within this distance behind pulse max will be discarted 241 float risingEdgeMinSlope = 0.5, 242 //---------------{graphical options}--------------- 235 243 bool select_pulses = false, 236 244 bool ProduceGraphic = false, … … 240 248 bool saveResults = true, 241 249 bool testmode = false, 242 int refresh_rate = 500 //refresh rate for canvases 250 //---------------{verbosity}--------------- 251 int refresh_rate = 500, //refresh rate for canvases 252 int verbosityLevel = 0 // different verbosity levels can be implemented here 243 253 ) 244 254 { … … 247 257 //----------------------------------------------------------------------------- 248 258 259 // Amplitude below which pulses will be discarted 249 260 float minPulseAmplitude = 0.3*(GainMean-BSLMean); 261 // Amplitude above which pulses will be discarted 250 262 float maxPulseAmplitude = 2*(GainMean-BSLMean)*maxPulseOrder; 263 // pulses within this distance to timeline edge be discarted 251 264 int timeLineEdgeWidth = 2; 265 // pulses within this distance behind pulse max will be discarted 252 266 int FallingEdgeWidth = 200; 253 int beginRisingEdge = 5; 254 int endRisingEdge = 10; 255 float risingEdgeMinSlope = 0.5; 267 256 268 257 269 //----------------------------------------------------------------------------- … … 896 908 //------------------------------------- 897 909 TString test = "root"; 898 Save Histograms( //save histograms of generell results into output root file910 SaveList( //save histograms of generell results into output root file 899 911 OutRootFileName, 900 912 test, … … 1123 1135 } 1124 1136 1137 float average_of_max = gVcorr[reg->maxPos]; 1138 average_of_max += gVcorr[reg->maxPos + 1]; 1139 average_of_max += gVcorr[reg->maxPos - 1]; 1140 average_of_max /= 3; 1141 1142 float slope_of_follow = 0.0; 1143 1125 1144 //Histograms for Maximum Overlay 1126 1145 for ( int pos = Left; pos < Right; pos++) 1127 1146 { 1147 if (pos > reg->maxPos + 2) 1148 { 1149 if ( pos+5 >= Right ) 1150 { 1151 break; 1152 } 1153 if (gVcorr[pos+1] > average_of_max) 1154 { 1155 break; 1156 } 1157 slope_of_follow = (gVcorr[pos+5] - gVcorr[pos+1])/5; 1158 1159 if (slope_of_follow > 1) 1160 { 1161 break; 1162 } 1163 } 1128 1164 CurrentPixel->hMaxOverlay[order_of_pulse]->Fill( pos - (reg->maxPos), gVcorr[pos]) ; 1129 1165 CurrentPixel->hMaxProfile[order_of_pulse]->Fill( pos - (reg->maxPos), gVcorr[pos]) ; … … 1132 1168 for ( int pos = EdgeLeft; pos < EdgeRight; pos++) 1133 1169 { 1170 if (pos > reg->maxPos + 2) 1171 { 1172 if ( pos+5 >= Right ) 1173 { 1174 break; 1175 } 1176 if (gVcorr[pos+1] > average_of_max) 1177 { 1178 break; 1179 } 1180 slope_of_follow = (gVcorr[pos+5] - gVcorr[pos+1])/5; 1181 1182 if (slope_of_follow > 1) 1183 { 1184 break; 1185 } 1186 } 1187 // if (pos > reg->maxPos 1188 // && gVcorr[pos] < average_of_max 1189 // && gVcorr[pos+3] > average_of_max 1190 // && gVcorr[pos+10] > average_of_max 1191 // ) 1192 // { 1193 // break; 1194 // } 1134 1195 CurrentPixel->hEdgeOverlay[order_of_pulse]->Fill( pos - (reg->halfRisingEdgePos), gVcorr[pos]) ; 1135 1196 CurrentPixel->hEdgeProfile[order_of_pulse]->Fill( pos - (reg->halfRisingEdgePos), gVcorr[pos]) ;
Note:
See TracChangeset
for help on using the changeset viewer.