<commit_before>#if !defined(__CINT__) || defined(__MAKECINT__)

#include <TROOT.h>
#include <TStyle.h>
#include <Riostream.h>
#include "TClassTable.h"
#include <TStopwatch.h>
#include <TDatime.h>
#include <TClassTable.h>
#include <TH1.h>
#include <TH2.h>
#include <TF1.h>
#include <TProfile.h>
#include <TFunction.h>
#include <TCanvas.h>
#include <TFile.h>

#endif

void CheckPedestal( Int_t optPlot = 1, const char * histoFName = "ZDCPedHisto.root")
{

  int const kNChannels = 24;
  //
  TFile * file = new TFile(histoFName, "READ");
  file->cd();
  TH1F::AddDirectory(0);
  //
  TH1F *hPedhg[kNChannels], *hPedOutOfTimehg[kNChannels];
  TH2F *hPedCorrhg[kNChannels];
  TH1F *hPedlg[kNChannels], *hPedOutOfTimelg[kNChannels];
  TH2F *hPedCorrlg[kNChannels];
  //
  char namhist1hg[50], namhist2hg[50], namhist3hg[50];
  char namhist1lg[50], namhist2lg[50], namhist3lg[50];
  for(Int_t j=0; j<kNChannels; j++){
     if(j<=4){ // ZNC
       sprintf(namhist1hg,"PedZNChg_%d",j);
       sprintf(namhist2hg,"PedZNChgOutOfTime_%d",j);
       sprintf(namhist3hg,"PedCorrZNChg_%d",j);
       //
       sprintf(namhist1lg,"PedZNClg_%d",j);
       sprintf(namhist2lg,"PedZNClgOutOfTime_%d",j);
       sprintf(namhist3lg,"PedCorrZNClg_%d",j);
     }
     else if(j>=5 && j<=9){ // ZPC
       sprintf(namhist1hg,"PedZPChg_%d",j-5);
       sprintf(namhist2hg,"PedZPChgOutOfTime_%d",j-5);
       sprintf(namhist3hg,"PedCorrZPChg_%d",j-5);
       //
       sprintf(namhist1lg,"PedZPClg_%d",j-5);
       sprintf(namhist2lg,"PedZPClgOutOfTime_%d",j-5);
       sprintf(namhist3lg,"PedCorrZPClg_%d",j-5);       
     }
     else if(j==10 || j==11){ // ZEM
       sprintf(namhist1hg,"PedZEMhg_%d",j-10);
       sprintf(namhist2hg,"PedZEMhgOutOfTime_%d",j-10);
       sprintf(namhist3hg,"PedCorrZEMhg_%d",j-10);
       //
       sprintf(namhist1lg,"PedZEMlg_%d",j-10);
       sprintf(namhist2lg,"PedZEMlgOutOfTime_%d",j-10);
       sprintf(namhist3lg,"PedCorrZEMlg_%d",j-10);
     }
     else if(j>=12 && j<=16){ // ZNA
       sprintf(namhist1hg,"PedZNAhg_%d",j-12);
       sprintf(namhist2hg,"PedZNAhgOutOfTime_%d",j-12);
       sprintf(namhist3hg,"PedCorrZNAhg_%d",j-12);
       //
       sprintf(namhist1lg,"PedZNAlg_%d",j-12);
       sprintf(namhist2lg,"PedZNAlgOutOfTime_%d",j-12);
       sprintf(namhist3lg,"PedCorrZNAlg_%d",j-12);
     }
     else if(j>=17 && j<=21){ // ZPA
       sprintf(namhist1hg,"PedZPAhg_%d",j-17);
       sprintf(namhist2hg,"PedZPAhgOutOfTime_%d",j-17);
       sprintf(namhist3hg,"PedCorrZPAhg_%d",j-17);
       //
       sprintf(namhist1lg,"PedZPAlg_%d",j-17);
       sprintf(namhist2lg,"PedZPAlgOutOfTime_%d",j-17);
       sprintf(namhist3lg,"PedCorrZPAlg_%d",j-17);
     }
     else if(j==22 || j==24){ //Reference PMs
       sprintf(namhist1hg,"PedRefhg_%d",j-22);
       sprintf(namhist2hg,"PedRefhgOutOfTime_%d",j-22);
       sprintf(namhist3hg,"PedCorrRefhg_%d",j-22);
       //
       sprintf(namhist1lg,"PedReflg_%d",j-22);
       sprintf(namhist2lg,"PedReflgOutOfTime_%d",j-22);<commit_msg>Updated macro<commit_after>#if !defined(__CINT__) || defined(__MAKECINT__)

#include <TROOT.h>
#include <TStyle.h>
#include <Riostream.h>
#include "TClassTable.h"
#include <TStopwatch.h>
#include <TDatime.h>
#include <TClassTable.h>
#include <TH1.h>
#include <TH2.h>
#include <TF1.h>
#include <TProfile.h>
#include <TFunction.h>
#include <TCanvas.h>
#include <TFile.h>

#endif

void CheckPedestal(const char * histoFName = "ZDCPedHisto.root", Int_t optPlot = 1)
{

  int const kNChannels = 24;
  //
  TFile * file = new TFile(histoFName, "READ");
  file->cd();
  TH1F::AddDirectory(0);
  //
  TH1F *hPedhg[kNChannels], *hPedOutOfTimehg[kNChannels];
  TH2F *hPedCorrhg[kNChannels];
  TH1F *hPedlg[kNChannels], *hPedOutOfTimelg[kNChannels];
  TH2F *hPedCorrlg[kNChannels];
  //
  char namhist1hg[50], namhist2hg[50], namhist3hg[50];
  char namhist1lg[50], namhist2lg[50], namhist3lg[50];
  for(Int_t j=0; j<kNChannels; j++){
     if(j<=4){ // ZNC
       sprintf(namhist1hg,"PedZNChg_%d",j);
       sprintf(namhist2hg,"PedZNChgOutOfTime_%d",j);
       sprintf(namhist3hg,"PedCorrZNChg_%d",j);
       //
       sprintf(namhist1lg,"PedZNClg_%d",j);
       sprintf(namhist2lg,"PedZNClgOutOfTime_%d",j);
       sprintf(namhist3lg,"PedCorrZNClg_%d",j);
     }
     else if(j>=5 && j<=9){ // ZPC
       sprintf(namhist1hg,"PedZPChg_%d",j-5);
       sprintf(namhist2hg,"PedZPChgOutOfTime_%d",j-5);
       sprintf(namhist3hg,"PedCorrZPChg_%d",j-5);
       //
       sprintf(namhist1lg,"PedZPClg_%d",j-5);
       sprintf(namhist2lg,"PedZPClgOutOfTime_%d",j-5);
       sprintf(namhist3lg,"PedCorrZPClg_%d",j-5);       
     }
     else if(j==10 || j==11){ // ZEM
       sprintf(namhist1hg,"PedZEMhg_%d",j-9);
       sprintf(namhist2hg,"PedZEMhgOutOfTime_%d",j-9);
       sprintf(namhist3hg,"PedCorrZEMhg_%d",j-9);
       //
       sprintf(namhist1lg,"PedZEMlg_%d",j-9);
       sprintf(namhist2lg,"PedZEMlgOutOfTime_%d",j-9);
       sprintf(namhist3lg,"PedCorrZEMlg_%d",j-9);
     }
     else if(j>=12 && j<=16){ // ZNA
       sprintf(namhist1hg,"PedZNAhg_%d",j-12);
       sprintf(namhist2hg,"PedZNAhgOutOfTime_%d",j-12);
       sprintf(namhist3hg,"PedCorrZNAhg_%d",j-12);
       //
       sprintf(namhist1lg,"PedZNAlg_%d",j-12);
       sprintf(namhist2lg,"PedZNAlgOutOfTime_%d",j-12);
       sprintf(namhist3lg,"PedCorrZNAlg_%d",j-12);
     }
     else if(j>=17 && j<=21){ // ZPA
       sprintf(namhist1hg,"PedZPAhg_%d",j-17);
       sprintf(namhist2hg,"PedZPAhgOutOfTime_%d",j-17);
       sprintf(namhist3hg,"PedCorrZPAhg_%d",j-17);
       //
       sprintf(namhist1lg,"PedZPAlg_%d",j-17);
       sprintf(namhist2lg,"PedZPAlgOutOfTime_%d",j-17);
       sprintf(namhist3lg,"PedCorrZPAlg_%d",j-17);
     }
     else if(j==22 || j==23){ //Reference PMs
       sprintf(namhist1hg,"PedRefhg_%d",j-22);
       sprintf(namhist2hg,"PedRefhgOutOfTime_%d",j-22);
       sprintf(namhist3hg,"PedCorrRefhg_%d",j-22);
       //
       sprintf(namhist1lg,"PedReflg_%d",j-22);
       sprintf(namhist2lg,"PedReflgOutOfTime_%d",j-22);
{'fraction_non_alphanumeric': 0.18048861558916404, 'fraction_numerical': 0.044540468672095726, 'mean_word_length': 3.857142857142857, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6300660', 'n_tokens_mistral': 2896, 'n_tokens_neox': 2729, 'n_words': 263}