// Collection of classes to acces APV pedestal and raw data recorded by MMDAQ // Implementation: // class APV_Pedestal_Tree // class APV_Info // class APV_Raw_Tree //#if !defined(__CINT__) || defined(__MAKECINT__) #if !defined(__CLING__) || defined(__ROOTCLING__) // for root 6 #include #include #include #include #include #include "stdlib.h" #include "TH1D.h" #include "TH2D.h" #include "TProfile.h" #include "TCanvas.h" #include "TLegend.h" #include "TCut.h" #include "TChain.h" #include "TTree.h" #include "TBranch.h" #include "TFile.h" #include "TClass.h" #include "TF1.h" #include "TLatex.h" #include "TPaveStats.h" #include "TStyle.h" #include "Process_apv_data.h" #endif /////////////////////////////////////////////////////////////////////////////// ///////// APV_Pedestal_Tree /////////////////////////////////////////////////////////////////////////////// APV_Pedestal_Tree::APV_Pedestal_Tree () : m_debug(1) {}; APV_Pedestal_Tree::~APV_Pedestal_Tree () {}; APV_Pedestal_Tree::APV_Pedestal_Tree (TTree *atree) { LinkTree(atree); } void APV_Pedestal_Tree::LinkTree (TTree *atree) { p_m_apv_evt = &m_apv_evt; p_m_time_s = &m_time_s; p_m_time_us = &m_time_us; p_m_apv_fec = &m_apv_fec; p_m_apv_id = &m_apv_id; p_m_apv_ch = &m_apv_ch; p_m_mm_id = &m_mm_id; p_m_mm_readout = &m_mm_readout; p_m_mm_strip = &m_mm_strip; p_m_apv_pedmean = &m_apv_pedmean; p_m_apv_pedsigma = &m_apv_pedsigma; p_m_apv_pedstd = &m_apv_pedstd; atree->SetBranchAddress("apv_evt", &p_m_apv_evt); atree->SetBranchAddress("time_s", &p_m_time_s); atree->SetBranchAddress("time_us", &p_m_time_us); atree->SetBranchAddress("apv_fecNo", &p_m_apv_fec); atree->SetBranchAddress("apv_id", &p_m_apv_id); atree->SetBranchAddress("apv_ch", &p_m_apv_ch); atree->SetBranchAddress("mm_id", &p_m_mm_id); atree->SetBranchAddress("mm_readout", &p_m_mm_readout); atree->SetBranchAddress("mm_strip", &p_m_mm_strip); atree->SetBranchAddress("apv_pedmean", &p_m_apv_pedmean); atree->SetBranchAddress("apv_pedsigma", &p_m_apv_pedsigma); atree->SetBranchAddress("apv_pedstd", &p_m_apv_pedstd); } /////////////////////////////////////////////////////////////////////////////// ///////// APV_Info /////////////////////////////////////////////////////////////////////////////// const Int_t APV_Info::APV_CH_NUMBER = 128; APV_Info::APV_Info(void) : APV_Pedestal_Tree(), pfile(0), ptree(0), entrread(-1) {;} APV_Info::APV_Info(const char *fname, const Int_t entrid) : APV_Pedestal_Tree(), pfile(0), ptree(0), entrread(-1) { const char *tree_name = "pedestals"; if (!fname) { std::stringstream msg("Error APV_Info::APV_Info: File name is not specified!\n"); throw msg.str(); } pfile = TFile::Open(fname, "READ"); if (!pfile) { std::stringstream msg; msg << "Error open file " << fname << "! Exit!\n"; throw msg.str(); } ptree = (TTree*)pfile->Get(tree_name); if (!ptree) { pfile->Close(); std::stringstream msg; msg << "Error extracting tree \"" << tree_name << "\" from the file " << fname << std::endl; throw msg.str(); } LinkTree(ptree); LoadData(entrid); pfile->Close(); delete pfile; pfile = 0; } void APV_Info::LoadData(const Int_t entrid) { if (! (pfile && pfile->IsOpen() && ptree) ) { std::string msg("Error APV_Info::LoadData: There is no tree!\n"); throw msg; } Int_t n_entries = ptree->GetEntries(); if (n_entries < 1) { pfile->Close(); std::string msg("Error APV_Info::LoadData: The tree is empty!\n"); throw msg; } if (entrid > 0 && entrid < n_entries) entrread = entrid; else entrread = n_entries-1; ptree->GetEntry(entrread); int entid = 0; for (std::vector ::iterator m_apv_itr = m_apv_pedmean.begin(); m_apv_itr != m_apv_pedmean.end(); ++m_apv_itr, ++entid) { if (pedestal.find(m_apv_id[entid]) == pedestal.end() ) { pedestal[m_apv_id[entid]] = std::vector(APV_CH_NUMBER); noise[m_apv_id[entid]] = std::vector(APV_CH_NUMBER); } pedestal[m_apv_id[entid]][m_apv_ch[entid]] = *m_apv_itr; noise[m_apv_id[entid]][m_apv_ch[entid]] = m_apv_pedstd[entid]; if (m_debug > 3 ) { std::cout << " apv_evt: " << m_apv_evt << std::endl; std::cout << " apv_fec: " << m_apv_fec[entid] << std::endl; std::cout << " apv_id : " << m_apv_id[entid] << std::endl; std::cout << " apv_ch : " << m_apv_ch[entid] << std::endl; std::cout << " mm_id : " << m_mm_id[entid] << std::endl; std::cout << " readout : " << m_mm_readout[entid] << std::endl; std::cout << " mm_strip : " << m_mm_strip[entid] << std::endl; std::cout << " apv_pedmean : " << m_apv_pedmean[entid] << std::endl; std::cout << " apv_pedsigma : " << m_apv_pedsigma[entid] << std::endl; std::cout << " apv_pedstd : " << m_apv_pedstd[entid] << std::endl << std::endl; } } if (m_debug > 0 ) { std::cout << " Loaded pedestal and noise (pedstd) data for " << pedestal.size() << " APV chips from the file " << pfile->GetName() << std::endl; std::cout << " Tree entry number " << n_entries-1 << " was used\n"; } // return 0; } APV_Info::~APV_Info() { if (pfile) { if (pfile->IsOpen()) pfile->Close(); delete pfile; } } Float_t APV_Info::GetPedestal(const int chipid, const int channalid) const { std::map< Int_t, std::vector >::const_iterator pitr = pedestal.find(chipid); if (pitr != pedestal.end() ) return pitr->second.at(channalid); else { std::string msg("Pedestal data is not loaded"); throw msg; } return 0; } Float_t APV_Info::GetNoise(const int chipid, const int channalid) { if (noise.find(chipid) != noise.end() ) return noise[chipid][channalid]; else { std::string msg("Noise data is not loaded"); throw msg; } return 0; } /////////////////////////////////////////////////////////////////////////////// ///////// APV_Raw_Tree /////////////////////////////////////////////////////////////////////////////// APV_Raw_Tree::APV_Raw_Tree () : p_file(0), p_rawtree(0), m_active_entry(-1), m_debug(0) {}; APV_Raw_Tree::~APV_Raw_Tree () { if (p_file) { if (p_file->IsOpen()) p_file->Close(); delete p_file; } } APV_Raw_Tree::APV_Raw_Tree (const Char_t *fname) : p_file(0), p_rawtree(0), m_active_entry(-1), m_debug(1) { const char *tree_name = "raw"; if (!fname) { std::stringstream msg("Error APV_Raw_Tree::APV_Raw_Tree: File name is not specified!\n"); throw msg.str(); } p_file = TFile::Open(fname, "READ"); if (!p_file) { std::stringstream msg; msg << "Error open file " << fname << "! Exit!\n"; throw msg.str(); } p_rawtree = (TTree*)p_file->Get(tree_name); if (!p_rawtree) { p_file->Close(); std::stringstream msg; msg << "APV_Raw_Tree::APV_Raw_Tree: Error extracting tree \"" << tree_name << "\" from the file " << fname << std::endl; throw msg.str(); } Init(); if (m_debug > 0 ) { std::cout << " Raw data tree " << tree_name << " from the file " << p_file->GetName() << " is opend for reading" << std::endl; std::cout << " Number of entries: " << p_rawtree->GetEntries() << std::endl; } } void APV_Raw_Tree::Init (void) { p_m_apv_evt = &m_apv_evt; p_m_time_s = &m_time_s; p_m_time_us = &m_time_us; p_m_apv_fec = &m_apv_fec; p_m_apv_id = &m_apv_id; p_m_apv_ch = &m_apv_ch; p_m_mm_id = &m_mm_id; p_m_mm_readout = &m_mm_readout; p_m_mm_strip = &m_mm_strip; p_m_apv_q = &m_apv_q; p_m_apv_presamples = &m_apv_presamples; p_rawtree->SetBranchAddress("apv_evt", &p_m_apv_evt); p_rawtree->SetBranchAddress("time_s", &p_m_time_s); p_rawtree->SetBranchAddress("time_us", &p_m_time_us); p_rawtree->SetBranchAddress("apv_fecNo", &p_m_apv_fec); p_rawtree->SetBranchAddress("apv_id", &p_m_apv_id); p_rawtree->SetBranchAddress("apv_ch", &p_m_apv_ch); p_rawtree->SetBranchAddress("mm_id", &p_m_mm_id); p_rawtree->SetBranchAddress("mm_readout", &p_m_mm_readout); p_rawtree->SetBranchAddress("mm_strip", &p_m_mm_strip); p_rawtree->SetBranchAddress("apv_q", &p_m_apv_q); p_rawtree->SetBranchAddress("apv_presamples", &p_m_apv_presamples); } /////////////////////////////////////////////////////////////////////////////// ///////// Test function /////////////////////////////////////////////////////////////////////////////// Int_t Process_apv_data(const Char_t *fname = 0, const int ev_to_show = 1) { if (!fname) { std::cout << "Usage: Process_apv_data.C(\"root_file_name_with_apv_data\", evntid_to_show = 1)\n"; return -2; } APV_Info *apvinf = new APV_Info(fname); TH1D *hh_ped = new TH1D("pedestal", "pedestal", 3000, 0.0, 3000.0); TH1D *hh_noise = new TH1D("noise", "noise", 200, 0.0, 200.0); TH1I *hh_timemax = new TH1I("timemax", "timemax", 30, 0, 30); TH1I *hh_channel = new TH1I("channel", "channel", 128, 0, 128); TH1I *hh_channel_0 = new TH1I("channel0", "channel APV0", 128, 0, 128); TH1I *hh_channel_1 = new TH1I("channel1", "channel APV1", 128, 0, 128); TH1I *hh_channel_2 = new TH1I("channel2", "channel APV2", 128, 0, 128); TH1I *hh_channel_3 = new TH1I("channel3", "channel APV3", 128, 0, 128); TH1I *hh_channel_4 = new TH1I("channel4", "channel APV4", 128, 0, 128); TH1I *hh_channel_5 = new TH1I("channel5", "channel APV5", 128, 0, 128); TH1I *hh_channel_6 = new TH1I("channel6", "channel APV6", 128, 0, 128); TH1I *hh_channel_7 = new TH1I("channel7", "channel APV7", 128, 0, 128); TH1I *hh_channel_8 = new TH1I("channel8", "channel APV8", 128, 0, 128); TH1I *hh_channel_9 = new TH1I("channel9", "channel APV9", 128, 0, 128); TH1I *hh_channel_10 = new TH1I("channel10", "channel APV10", 128, 0, 128); TH1I *hh_channel_11 = new TH1I("channel11", "channel APV11", 128, 0, 128); TH1I *hh_channel_12 = new TH1I("channel12", "channel APV12", 128, 0, 128); TH1I *hh_channel_13 = new TH1I("channel13", "channel APV13", 128, 0, 128); TH1I *hh_channel_14 = new TH1I("channel14", "channel APV14", 128, 0, 128); TH1I *hh_channel_15 = new TH1I("channel15", "channel APV15", 128, 0, 128); TH1I *hh_ADC_0 = new TH1I("ADC APV0", "ADC APV0", 2000, 0, 2000); TH1I *hh_ADC_1 = new TH1I("ADC APV1", "ADC APV1", 2000, 0, 2000); TH1I *hh_ADC_2 = new TH1I("ADC APV2", "ADC APV2", 2000, 0, 2000); TH1I *hh_ADC_3 = new TH1I("ADC APV3", "ADC APV3", 2000, 0, 2000); TH1I *hh_ADC_4 = new TH1I("ADC APV4", "ADC APV4", 2000, 0, 2000); TH1I *hh_ADC_5 = new TH1I("ADC APV5", "ADC APV5", 2000, 0, 2000); TH1I *hh_ADC_6 = new TH1I("ADC APV6", "ADC APV6", 2000, 0, 2000); TH1I *hh_ADC_7 = new TH1I("ADC APV7", "ADC APV7", 2000, 0, 2000); TH1I *hh_ADC_8 = new TH1I("ADC APV8", "ADC APV8", 2000, 0, 2000); TH1I *hh_ADC_9 = new TH1I("ADC APV9", "ADC APV9", 2000, 0, 2000); TH1I *hh_ADC_10 = new TH1I("ADC APV10", "ADC APV10", 2000, 0, 2000); TH1I *hh_ADC_11 = new TH1I("ADC APV11", "ADC APV11", 2000, 0, 2000); TH1I *hh_ADC_12 = new TH1I("ADC APV12", "ADC APV12", 2000, 0, 2000); TH1I *hh_ADC_13 = new TH1I("ADC APV13", "ADC APV13", 2000, 0, 2000); TH1I *hh_ADC_14 = new TH1I("ADC APV14", "ADC APV14", 2000, 0, 2000); TH1I *hh_ADC_15 = new TH1I("ADC APV15", "ADC APV15", 2000, 0, 2000); TH2I *hh_CALO1_2D = new TH2I("CALO1 2D", "CALO1 2D", 4, 0, 4,64,0,64); TH2I *hh_CALO2_2D = new TH2I("CALO2 2D", "CALO2 2D", 4, 0, 4,64,0,64); TH2I *hh_CALO3_2D = new TH2I("CALO3 2D", "CALO3 2D", 4, 0, 4,64,0,64); TH2I *hh_CALO4_2D = new TH2I("CALO4 2D", "CALO4 2D", 4, 0, 4,64,0,64); TH2I *hh_TR1_2D = new TH2I("TR1 2D", "TR1 2D", 4, 0, 4,64,0,64); TH2I *hh_TR2_2D = new TH2I("TR2 2D", "TR2 2D", 4, 0, 4,64,0,64); hh_ped->SetDirectory(0); hh_noise->SetDirectory(0); const std::map< Int_t, std::vector > *ped = apvinf->GetPedestal(); const std::map< Int_t, std::vector > *noise = apvinf->GetNoise(); for (std::map< Int_t, std::vector >::const_iterator pitr = ped->begin(); pitr != ped->end(); ++pitr) { const std::vector pedchip = pitr->second; for (unsigned int pci = 0; pci < pedchip.size(); ++pci) { hh_ped->Fill(pedchip[pci]); } } for (std::map< Int_t, std::vector >::const_iterator pitr = noise->begin(); pitr != noise->end(); ++pitr) { const std::vector noisechip = pitr->second; for (unsigned int pci = 0; pci < noisechip.size(); ++pci) { hh_noise->Fill(noisechip[pci]); } } TCanvas *c1 = new TCanvas("Time max", "Time bin with max amplitude", 900, 600); TCanvas *c2 = new TCanvas("ADC counts", "ADC counts for t=3", 900, 600); TCanvas *c3 = new TCanvas("pads position tracker", "tracker : Pads for t=3", 900, 600); TCanvas *c4 = new TCanvas("pads position lumical", "Lumical : Pads for t=3", 900, 600); TCanvas *c5 = new TCanvas("pads ", " Pads for t=3", 900, 600); TCanvas *c6 = new TCanvas("tracker ", " Tracker for t=3", 900, 600); //c1->Divide(2, 1); //c1->cd(1); //hh_ped->Draw(); //c1->cd(2); //hh_noise->Draw(); delete apvinf; // Scann events and show one of them std::vector fhist_t_ch_event; APV_Raw_Tree *apvraw = new APV_Raw_Tree(fname); while (apvraw->Next()) { const std::vector < std::vector > *m_apv_q = apvraw->GetAPVSignal(); const std::vector *m_apv_id = apvraw->GetAPVid(); const std::vector *m_apv_ch = apvraw->GetAPVChannel(); if (apvraw->GetActiveEntryID() < ev_to_show) // apvraw->GetActiveEntryID(); { // count number of APVs present in the event std::vector apv_ids(m_apv_id->begin(), m_apv_id->end()); std::sort(apv_ids.begin(), apv_ids.end()); std::vector ::iterator itr = std::unique(apv_ids.begin(), apv_ids.end()); apv_ids.resize( std::distance(apv_ids.begin(),itr) ); // collection of APV Ids present in a raw data file int n_apvs = apv_ids.size(); fhist_t_ch_event.resize(n_apvs, (TH2D*)0); // scann the event data on channels int entid = 0; int adc_max=0; int t_max=0; int counter=0; int channel=0; for (std::vector < std::vector >::const_iterator m_apv_q_itr = m_apv_q->begin(); m_apv_q_itr != m_apv_q->end(); ++m_apv_q_itr, ++entid) { int apv_pos = std::find(apv_ids.begin(), apv_ids.end(), m_apv_id->at(entid)) - apv_ids.begin(); // std::cout<<" apv number : "<< apv_pos << std::endl; /* if (!fhist_t_ch_event[apv_pos]) { fhist_t_ch_event[apv_pos] = new TH2D(Form("APV_%d", m_apv_id->at(entid)), Form("APV_%d", m_apv_id->at(entid)), 22, -0.5, 21.5, 129, -0.5, 128.5); fhist_t_ch_event[apv_pos]->SetDirectory(0); } */ // if (apv_pos ==7) { // scan the data of a channel on time bins Int_t tid = 0; for (std::vector ::const_iterator m_apv_t_itr = m_apv_q_itr->begin(); m_apv_t_itr != m_apv_q_itr->end(); ++m_apv_t_itr, ++tid) { // fhist_t_ch_event[apv_pos]->SetBinContent(fhist_t_ch_event[apv_pos]->FindBin(tid, m_apv_ch->at(entid)), *m_apv_t_itr); // if (*m_apv_t_itr > 50 ) // std::cout<< " apv number : "<< apv_pos << " channel number = " << m_apv_ch->at(entid) << " ADC count = " << *m_apv_t_itr << " timing : " << tid << std::endl; if (*m_apv_t_itr > adc_max) // if (tid == 3) { adc_max = *m_apv_t_itr ; t_max = tid; channel=m_apv_ch->at(entid); } } counter++; // std::cout<< " counter : "<< counter << std::endl; hh_timemax->Fill(t_max); if (t_max == 3) { hh_channel->Fill(channel); if (apv_pos==0) { hh_ADC_0->Fill(adc_max); hh_channel_0->Fill(channel); if (channel/64 ==0) { hh_TR1_2D->Fill(2+channel/64,64-(channel%64)-1); } else hh_TR1_2D->Fill(2+channel/64,channel%64); } if (apv_pos==1) { hh_ADC_1->Fill(adc_max); hh_channel_1->Fill(channel); if (channel/64 ==0) { hh_TR1_2D->Fill(channel/64,64-(channel%64)-1); } else hh_TR1_2D->Fill(channel/64,channel%64); } if (apv_pos==2) { hh_ADC_2->Fill(adc_max); hh_channel_2->Fill(channel); if (channel/64 ==0) { hh_TR2_2D->Fill(2+channel/64,64-(channel%64)-1); } else hh_TR2_2D->Fill(2+channel/64,channel%64); } if (apv_pos==3) { hh_ADC_3->Fill(adc_max); hh_channel_3->Fill(channel); if (channel/64 ==0) { hh_TR2_2D->Fill(channel/64,64-(channel%64)-1); } else hh_TR2_2D->Fill(channel/64,channel%64); } if (apv_pos==4) { hh_ADC_4->Fill(adc_max); hh_channel_4->Fill(channel); // std::cout << "before channel " << channel << " row " << channel%64 << " column "<< channel/64 <Fill(2+channel/64,64-(channel%64)-1); // std::cout << "channel " << channel << " row " << 64-(channel%64) << " column "<< channel/64 <Fill(2+channel/64,channel%64); } if (apv_pos==5) { hh_ADC_5->Fill(adc_max); hh_channel_5->Fill(channel); // std::cout << "before channel " << channel << " row " << channel%64 << " column "<< channel/64 <Fill(channel/64,64-(channel%64)-1); // std::cout << "channel " << channel << " row " << 64-(channel%64) << " column "<< channel/64 <Fill(channel/64,channel%64); } if (apv_pos==6) { hh_ADC_6->Fill(adc_max); hh_channel_6->Fill(channel); if (channel/64 ==0) { hh_CALO2_2D->Fill(2+channel/64,64-(channel%64)-1); } else hh_CALO2_2D->Fill(2+channel/64,channel%64); } if (apv_pos==7) { hh_ADC_7->Fill(adc_max); hh_channel_7->Fill(channel); if (channel/64 ==0) { hh_CALO2_2D->Fill(channel/64,64-(channel%64)-1); } else hh_CALO2_2D->Fill(channel/64,channel%64); } if (apv_pos==8) { hh_ADC_8->Fill(adc_max); hh_channel_8->Fill(channel); if (channel/64 ==0) { hh_CALO3_2D->Fill(2+channel/64,64-(channel%64)-1); } else hh_CALO3_2D->Fill(2+channel/64,channel%64); } if (apv_pos==9) { hh_ADC_9->Fill(adc_max); hh_channel_9->Fill(channel); if (channel/64 ==0) { hh_CALO3_2D->Fill(channel/64,64-(channel%64)-1); } else hh_CALO3_2D->Fill(channel/64,channel%64); } if (apv_pos==10) { hh_ADC_10->Fill(adc_max); hh_channel_10->Fill(channel); if (channel/64 ==0) { hh_CALO4_2D->Fill(2+channel/64,64-(channel%64)-1); } else hh_CALO4_2D->Fill(2+channel/64,channel%64); } if (apv_pos==11) { hh_ADC_11->Fill(adc_max); hh_channel_11->Fill(channel); if (channel/64 ==0) { hh_CALO4_2D->Fill(channel/64,64-(channel%64)-1); } else hh_CALO4_2D->Fill(channel/64,channel%64); } if (apv_pos==12) { hh_ADC_12->Fill(adc_max); hh_channel_12->Fill(channel); } if (apv_pos==13) { hh_ADC_13->Fill(adc_max); hh_channel_13->Fill(channel); } if (apv_pos==14) { hh_ADC_14->Fill(adc_max); hh_channel_14->Fill(channel); } if (apv_pos==15) { hh_ADC_15->Fill(adc_max); hh_channel_15->Fill(channel); } } // std::cout << "t_max = " << t_max << std::endl; } // if (apv_pos == 1) hh_timemax->Fill(t_max); adc_max=0; t_max=0; } // Draw the histograms // TCanvas *c2 = new TCanvas(Form("Signal_event_%d", ev_to_show), Form("Signal event: %d", ev_to_show), 900, 600); // c2->Divide(n_apvs/2cd(ii+1); // fhist_t_ch_event.at(ii)->Draw("lego2"); // } // hh_timemax->Draw(); } // if (apvraw->GetActiveEntryID() > 0) break; } c1->Divide(1,2); c1->cd(1); hh_timemax->Draw(); c1->cd(2); hh_channel->Draw(); c2->Divide(2,8); c2->cd(1); hh_ADC_0->Draw(); c2->cd(2); hh_ADC_1->Draw(); c2->cd(3); hh_ADC_2->Draw(); c2->cd(4); hh_ADC_3->Draw(); c2->cd(5); hh_ADC_4->Draw(); c2->cd(6); hh_ADC_5->Draw(); c2->cd(7); hh_ADC_6->Draw(); c2->cd(8); hh_ADC_7->Draw(); c2->cd(9); hh_ADC_8->Draw(); c2->cd(10); hh_ADC_9->Draw(); c2->cd(11); hh_ADC_10->Draw(); c2->cd(12); hh_ADC_11->Draw(); c2->cd(13); hh_ADC_12->Draw(); c2->cd(14); hh_ADC_13->Draw(); c2->cd(15); hh_ADC_14->Draw(); c2->cd(16); hh_ADC_15->Draw(); c3->Divide(2,2); c3->cd(1); hh_channel_0->Draw(); c3->cd(2); hh_channel_1->Draw(); c3->cd(3); hh_channel_2->Draw(); c3->cd(4); hh_channel_3->Draw(); c4->Divide(2,6); c4->cd(1); hh_channel_4->Draw(); c4->cd(2); hh_channel_5->Draw(); c4->cd(3); hh_channel_6->Draw(); c4->cd(4); hh_channel_7->Draw(); c4->cd(5); hh_channel_8->Draw(); c4->cd(6); hh_channel_9->Draw(); c4->cd(7); hh_channel_10->Draw(); c4->cd(8); hh_channel_11->Draw(); c4->cd(9); hh_channel_12->Draw(); c4->cd(10); hh_channel_13->Draw(); c4->cd(11); hh_channel_14->Draw(); c4->cd(12); hh_channel_15->Draw(); c5->Divide (2,2); c5->cd(1); hh_CALO1_2D->Draw("COLZ"); c5->cd(2); hh_CALO2_2D->Draw("COLZ"); c5->cd(3); hh_CALO3_2D->Draw("COLZ"); c5->cd(4); hh_CALO4_2D->Draw("COLZ"); c6->Divide(2,1); c6->cd(1); hh_TR1_2D->Draw("COLZ"); c6->cd(2); hh_TR2_2D->Draw("COLZ"); int binmax = hh_timemax->GetMaximumBin(); double x = hh_timemax->GetXaxis()->GetBinCenter(binmax); std::cout << "bin max : " << x <