//_____________________________________________________________________________
void ProofSimpleFile::Terminate()
{
   // The Terminate() function is the last function to be called during
   // a query. It always runs on the client, it can be used to present
   // the results graphically or save the results to file.

   // Get the histos from the file
   if ((fProofFile =
           dynamic_cast<TProofOutputFile*>(fOutput->FindObject("SimpleFile.root")))) {

      TString outputFile(fProofFile->GetOutputFileName());
      TString outputName(fProofFile->GetName());
      outputName += ".root";
      Printf("outputFile: %s", outputFile.Data());

      // Read the ntuple from the file
      if (!(fFile = TFile::Open(outputFile))) {
         Error("Terminate", "could not open file: %s", outputFile.Data());
         return;
      }

   } else {
      Error("Terminate", "TProofOutputFile not found");
      return;
   }

   // Top histos
   PlotHistos(0);
   // Dir histos
   PlotHistos(1);
}
Пример #2
0
//===============================================
void plotMCClosure(Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_16Dec2011_ProdSingleMuEff_woRhoFactor.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_16Dec2011_ProdSingleMuEff_withRhoFactor.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_15Dec2011_ProdSingleMuEff_withRhoFactor.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_ProdSingleMuEff_noDimuVtxEffCorrection.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_SingleMuEff_noDimuVtxEffCorrection.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_ProdSingleMuEff_fitted.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_SingleMuEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_ProdSingleMuEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_SingleMuEff_pTMin4c5GeV.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_ProdSingleMuEff_pTMin4c5GeV.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_ProdSingleMuEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_14Dec2011_ProdSingleMuEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011_ProdSingleMuEff_pTMin2c5GeV.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011_ProdSingleMuEff_pTMin4c5GeV.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011_SingleMuEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011_ProdSingleMuEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011_withTrackingEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011_noDimuVertexEff.root"){
  //Char_t *fileNameIn = "MCClosure_HLTDimuon10JpsiBarrel_13Dec2011.root"){

  LoadHistos(fileNameIn);
  PlotHistos();

  Int_t iFrame = 1;
  for(int iRapBin = 1; iRapBin < eff::kNbRapForPTBins+1; iRapBin++)
    for(int iPTBin = 6; iPTBin < eff::kNbPTBins[iRapBin]+1; iPTBin++)
      PlotRatioHistos(iFrame, iRapBin, iPTBin, EFFCORR, GEN_ACC);

}
Пример #3
0
//=======================
void plotSignalAndBGofMC(Char_t *fileNameIn = "histos_jPsi_2360GeV_STARTUP", //don't put ".root" at the end!
                         Char_t *enLabel = "2360 GeV",
                         Bool_t takeBest = kTRUE, //uses the histograms after all cuts
                         Bool_t normalize = kTRUE, //normalizes the histos to 1 nb-1
                         Double_t intLumi = 261.//jPsi: DESIGN:  2.36 TeV: 266.; 900 GeV: 263.
                                 //jPsi: STARTUP: 2.36 TeV: 261.; 900 GeV: 384.
                        ) {

    LoadHistos(fileNameIn, takeBest);
    Normalize(normalize, intLumi);
    LoadBGHistos("histos_ppMuXLoose_2360GeV_STARTUP.root", takeBest, 5.5);

    PlotHistos(enLabel, fileNameIn);
    PrintStat();
}