Hi,
I must do something wrong since I am booking in total about 3000 hists but root crashes (5.28.00). If I reduce it to about 1000 hists everything runs smooth. I am booking the hists in a seperate function as you can see below. I was just wondering if thats the problem because I create a lot of new hists? The filling is done in the main loop and safed afterwards.
thanks for your help
Here my setup:
const int EF_num_trig = 11;
const int L1_num_trig = 5;
const int ref = 15;
void triggerEff::BookHistos(){
int et_bins = 600;
double et_min = 0;
double et_max = 600;
double eta_bins = 800;
double eta_min = -4;
double eta_max = 4;
int emfrac_bins = 140;
double emfrac_min = 0;
double emfrac_max = 1.4;
int WIDTH_bins = 800;
double WIDTH_min = 0;
double WIDTH_max = 8;
// Define histograms
m_h_RunNumber = new TH1F("RunNumber", "RunNumber", 250000, 0., 250000.);
m_h_RunNumber ->Sumw2();
m_h_vxp_n = new TH1F("vxp_n", "vxp_n", 600, 0., 600.);
m_h_vxp_n ->Sumw2();
m_h_event_counter = new TH1I("event_counter", "event_counter", 2, 0., 2.);
m_h_event_counter ->Sumw2();
m_h_jet_quality = new TH1F("jet_quality", "jet_quality", 4, 0., 4.);
m_h_jet_quality ->Sumw2();
m_h_jet_leading_noTrig = new TH1F("jet_leading_noTrig", "jet_leading_noTrig", et_bins, et_min, et_max);
m_h_jet_leading_noTrig ->Sumw2();
TString label;
TString L1[L1_num_trig];
L1[4] = "_L1_j10";
L1[3] = "_L1_j15";
L1[2] = "_L1_j30";
L1[1] = "_L1_j55";
L1[0] = "_L1_j75";
TString EF[EF_num_trig];
EF[10] = "_EF_j10";
EF[9] = "_EF_j15";
EF[8] = "_EF_j20";
EF[7] = "_EF_j30";
EF[6] = "_EF_j40";
EF[5] = "_EF_j55";
EF[4] = "_EF_j75";
EF[3] = "_EF_j100";
EF[2] = "_EF_j135";
EF[1] = "_EF_j180";
EF[0] = "_EF_j240";
TString refer[ref];
refer[0] = "EF_j10_ref";
refer[1] = "EF_j15_ref";
refer[2] = "EF_j20_ref";
refer[3] = "EF_j30_ref";
refer[4] = "EF_j40_ref";
refer[5] = "EF_j55_ref";
refer[6] = "EF_j75_ref";
refer[7] = "EF_j100_ref";
refer[8] = "EF_j135_ref";
refer[9] = "EF_j180_ref";
refer[10] = "EF_j240_ref";
refer[11] = "EF_j10j15j20_ref";
refer[12] = "EF_j10_passThrough";
refer[13] = "EF_fj10_passThrough";
refer[14] = "EF_j10fj10_passThrough";
for(int r = 0; r < ref; ++r){
myfile->cd();
myfile->mkdir(refer[r]);
myfile->cd(refer[r]);
label = "leading_dR";
m_h_jet_leading_dR[r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_jet_leading_dR[r] ->Sumw2();
label = "jet_Et";
m_h_jet_Et[r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_jet_Et[r] ->Sumw2();
label = "jet_Et_wo";
m_h_jet_Et_wo[r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_jet_Et_wo[r] ->Sumw2();
label = "jet_eta";
m_h_jet_eta[r] = new TH1F(label, label, eta_bins, eta_min, eta_max);
m_h_jet_eta[r] ->Sumw2();
label = "jet_phi";
m_h_jet_phi[r] = new TH1F(label, label, 400, -4, 4);
m_h_jet_phi[r] ->Sumw2();
label = "leading_jet_Et";
m_h_leading_jet_Et[r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_leading_jet_Et[r] ->Sumw2();
label = "leading_jet_eta_Et";
m_h_leading_jet_eta_Et[r] = new TH2F(label, label, et_bins, et_min, et_max, eta_bins, eta_min, eta_max);
m_h_leading_jet_eta_Et[r] ->Sumw2();
label = "leading_jet_emfrac_Et";
m_h_leading_jet_emfrac_Et[r] = new TH2F(label, label, et_bins, et_min, et_max, emfrac_bins, emfrac_min, emfrac_max);
m_h_leading_jet_emfrac_Et[r] ->Sumw2();
label = "leading_jet_WIDTH_Et";
m_h_leading_jet_WIDTH_Et[r] = new TH2F(label, label, et_bins, et_min, et_max, WIDTH_bins, WIDTH_min, WIDTH_max);
m_h_leading_jet_WIDTH_Et[r] ->Sumw2();
for(int k = 0; k < L1_num_trig; ++k){
label = "jet_Et";
label += L1[k];
m_h_L1_Et[k][r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_L1_Et[k][r] ->Sumw2();
label = "leading_jet_Et";
label += L1[k];
m_h_leading_jet_L1_Et[k][r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_leading_jet_L1_Et[k][r] ->Sumw2();
label = "leading_jet_eta_Et";
label += L1[k];
m_h_leading_jet_L1_eta_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, eta_bins, eta_min, eta_max);
m_h_leading_jet_L1_eta_Et[k][r] ->Sumw2();
label = "leading_jet_emfrac_Et";
label += L1[k];
m_h_leading_jet_L1_emfrac_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, emfrac_bins, emfrac_min, emfrac_max);
m_h_leading_jet_L1_emfrac_Et[k][r] ->Sumw2();
label = "leading_jet_WIDTH_Et";
label += L1[k];
m_h_leading_jet_L1_WIDTH_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, WIDTH_bins, WIDTH_min, WIDTH_max);
m_h_leading_jet_L1_WIDTH_Et[k][r] ->Sumw2();
label = "matching_jet_Et";
label += L1[k];
m_h_matching_jet_L1_Et[k][r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_matching_jet_L1_Et[k][r] ->Sumw2();
label = "matching_jet_eta_Et";
label += L1[k];
m_h_matching_jet_L1_eta_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, eta_bins, eta_min, eta_max);
m_h_matching_jet_L1_eta_Et[k][r] ->Sumw2();
label = "matching_jet_emfrac_Et";
label += L1[k];
m_h_matching_jet_L1_emfrac_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, emfrac_bins, emfrac_min, emfrac_max);
m_h_matching_jet_L1_emfrac_Et[k][r] ->Sumw2();
label = "matching_jet_WIDTH_Et";
label += L1[k];
m_h_matching_jet_L1_WIDTH_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, WIDTH_bins, WIDTH_min, WIDTH_max);
m_h_matching_jet_L1_WIDTH_Et[k][r] ->Sumw2();
}
for(int k = 0; k < EF_num_trig; ++k){
label = "jet_Et";
label += EF[k];
m_h_EF_Et[k][r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_EF_Et[k][r] ->Sumw2();
label = "leading_jet_Et";
label += EF[k];
m_h_leading_jet_EF_Et[k][r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_leading_jet_EF_Et[k][r] ->Sumw2();
label = "leading_jet_eta_Et";
label += EF[k];
m_h_leading_jet_EF_eta_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, eta_bins, eta_min, eta_max);
m_h_leading_jet_EF_eta_Et[k][r] ->Sumw2();
label = "leading_jet_emfrac_Et";
label += EF[k];
m_h_leading_jet_EF_emfrac_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, emfrac_bins, emfrac_min, emfrac_max);
m_h_leading_jet_EF_emfrac_Et[k][r] ->Sumw2();
label = "leading_jet_WIDTH_Et";
label += EF[k];
m_h_leading_jet_EF_WIDTH_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, WIDTH_bins, WIDTH_min, WIDTH_max);
m_h_leading_jet_EF_WIDTH_Et[k][r] ->Sumw2();
label = "matching_jet_Et";
label += EF[k];
m_h_matching_jet_EF_Et[k][r] = new TH1F(label, label, et_bins, et_min, et_max);
m_h_matching_jet_EF_Et[k][r] ->Sumw2();
label = "matching_jet_eta_Et";
label += EF[k];
m_h_matching_jet_EF_eta_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, eta_bins, eta_min, eta_max);
m_h_matching_jet_EF_eta_Et[k][r] ->Sumw2();
label = "matching_jet_emfrac_Et";
label += EF[k];
m_h_matching_jet_EF_emfrac_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, emfrac_bins, emfrac_min, emfrac_max);
m_h_matching_jet_EF_emfrac_Et[k][r] ->Sumw2();
label = "matching_jet_WIDTH_Et";
label += EF[k];
m_h_matching_jet_EF_WIDTH_Et[k][r] = new TH2F(label, label, et_bins, et_min, et_max, WIDTH_bins, WIDTH_min, WIDTH_max);
m_h_matching_jet_EF_WIDTH_Et[k][r] ->Sumw2();
}
}
}//end triggerEff::Bookhistos()