Ignore:
Timestamp:
02/21/13 14:01:01 (12 years ago)
Author:
Jens Buss
Message:
changed SaveHistograms to SaveFileList
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/PulseTemplates/FPulseOverlay_filelist.C

    r14809 r14941  
    211211//----------------------------------------------------------------------------
    212212int FPulseOverlay_filelist(
     213        //---------------{Process Files}---------------
    213214        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}---------------
    216219        int         nRuns               = -1,
    217 //        TString     drsfilename         = "20120309_012.drs.fits.gz",
    218         TString     OutputPath          = "analysis/pulseShape/",
    219         TString     OutRootFileName     = "20120802_0mV_newSelectAlg.root",
    220220        int         firstevent          = 1,        // Hast to be between 1 and infinity NOT 0!!!!
    221221        int         nevents             = -1,
    222222        int         firstpixel          = 0,
    223         int         npixel              = 1,
     223        int         npixel              = -1,
    224224        int         pixelSetSize       = 150,
    225225        int         maxPulseOrder       = 6,
    226         int         verbosityLevel      = 0,        // different verbosity levels can be implemented here
     226        //---------------{stacking parameters}---------------
    227227        TString     histoOptions        = "SRM",
    228         int         AmplWindowWidth     = 7,       //Width of Window for selection of pulses to histograms
    229         float       GainMean            = 11,
     228        int         AmplWindowWidth     = 8,       //Width of Window for selection of pulses to histograms
     229        float       GainMean            = 12,
    230230        float       BSLMean             = -2,        //4 Histogramms will be drawn, decide how far pulsehights differ from eachother
    231231        int         avg1                = 8,
    232232        int         avg2                = 8,
    233         int         OverlayWindowLeft   = 1024,
     233        int         OverlayWindowLeft   = 100,
    234234        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}---------------
    235243        bool            select_pulses   = false,
    236244        bool        ProduceGraphic      = false,
     
    240248        bool        saveResults         = true,
    241249        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
    243253        )
    244254{
     
    247257//-----------------------------------------------------------------------------
    248258
     259    // Amplitude below which pulses will be discarted
    249260    float minPulseAmplitude     = 0.3*(GainMean-BSLMean);
     261    // Amplitude above which pulses will be discarted
    250262    float maxPulseAmplitude     = 2*(GainMean-BSLMean)*maxPulseOrder;
     263    // pulses within this distance to timeline edge be discarted
    251264    int   timeLineEdgeWidth     = 2;
     265    // pulses within this distance behind pulse max will be discarted
    252266    int   FallingEdgeWidth      = 200;
    253     int   beginRisingEdge       = 5;
    254     int   endRisingEdge         = 10;
    255     float   risingEdgeMinSlope    = 0.5;
     267
    256268
    257269//-----------------------------------------------------------------------------
     
    896908//-------------------------------------
    897909    TString test = "root";
    898     SaveHistograms(     //save histograms of generell results into output root file
     910    SaveList(     //save histograms of generell results into output root file
    899911                OutRootFileName,
    900912                test,
     
    11231135            }
    11241136
     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
    11251144            //Histograms for Maximum Overlay
    11261145            for ( int pos = Left; pos < Right; pos++)
    11271146            {
     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                }
    11281164                CurrentPixel->hMaxOverlay[order_of_pulse]->Fill( pos - (reg->maxPos), gVcorr[pos]) ;
    11291165                CurrentPixel->hMaxProfile[order_of_pulse]->Fill( pos - (reg->maxPos), gVcorr[pos]) ;
     
    11321168            for ( int pos = EdgeLeft; pos < EdgeRight; pos++)
    11331169            {
     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//                }
    11341195                CurrentPixel->hEdgeOverlay[order_of_pulse]->Fill( pos - (reg->halfRisingEdgePos), gVcorr[pos]) ;
    11351196                CurrentPixel->hEdgeProfile[order_of_pulse]->Fill( pos - (reg->halfRisingEdgePos), gVcorr[pos]) ;
Note: See TracChangeset for help on using the changeset viewer.