ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/scripts/mergeHists
(Generate patch)

Comparing UserCode/OSUT3Analysis/AnaTools/scripts/mergeHists (file contents):
Revision 1.21 by ahart, Wed Mar 6 17:01:01 2013 UTC vs.
Revision 1.23 by lantonel, Wed Apr 10 13:34:17 2013 UTC

# Line 146 | Line 146 | foreach my $mergedFile (@mergedFiles)
146      unlink ("$mergedFile");
147    }
148   print "=============================================\n";
149 + my $output = sprintf "Cross-section of samples:\n";
150 + my $printOutput = 0;
151 + foreach my $arg (keys %weights)
152 + {
153 +    my $shortArg = $arg;
154 +    $shortArg =~ s/^.*\/([^\/]*)$/$1/;
155 +    $output = sprintf "%s  $shortArg: %.5g pb\n", $output, ($crossSections{$dirs{$arg}});
156 +    $printOutput = 1 if $weights{$arg} != 1;
157 + }
158 + print $output if $printOutput;
159 +
160   my $output = sprintf "Effective luminosities of samples:\n";
161   my $printOutput = 0;
162   foreach my $arg (keys %weights)
# Line 156 | Line 167 | foreach my $arg (keys %weights)
167      $printOutput = 1 if $weights{$arg} != 1;
168    }
169   print $output if $printOutput;
170 +
171   $output = sprintf "Weights for target luminosity of %g/fb:\n", ($integratedLuminosity / 1000.0);
172   $printOutput = 0;
173   foreach my $arg (keys %weights)
# Line 166 | Line 178 | foreach my $arg (keys %weights)
178      $printOutput = 1 if $weights{$arg} != 1;
179    }
180   print $output if $printOutput;
181 +
182   my $goodEvents = countEvents ("$opt{'prefix'}.root", $cutFlow);
183   print "$nGoodJobs jobs ran successfully over $nTotalEvents ($goodEvents weighted) events.\n" if $counting;
184   print "$nBadJobs jobs failed to run.\n" if $counting;
# Line 224 | Line 237 | printHelp
237    printf "%-29s%s\n", "  -c, --cutflow HISTOGRAM", "name of histogram to use for the cutflow (default:";
238    printf "%-29s%s\n", "                  ", "cutFlow)";
239    printf "%-29s%s\n", "  -h, --help", "print this help message";
240 <  printf "%-29s%s\n", "  -l, --luminosity", "integrated luminosity to which the histograms are";
228 <  printf "%-29s%s\n", "                  ", "weighted (default: 10000/pb)";
240 >  printf "%-29s%s\n", "  -l, --luminosity", "integrated luminosity to which the histograms are weighted";
241    printf "%-29s%s\n", "  -p, --prefix PREFIX", "output is  named PREFIX.root";
242    printf "%-29s%s\n", "  -w, --weight WEIGHT", "scale the output by WEIGHT, overriding the";
243    printf "%-29s%s\n", "                     ", "automatic weighting using the cross section from";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines