File indexing completed on 2024-04-06 12:19:24
0001 #define MinBias_cxx
0002 #include "MinBias.h"
0003 #include <TH2.h>
0004 #include <TStyle.h>
0005 #include <TCanvas.h>
0006
0007 void MinBias::Loop()
0008 {
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 if (fChain == 0) return;
0033
0034 Long64_t nentries = fChain->GetEntriesFast();
0035 TH1F *hCalo1[110][50];
0036 TH1F *hCalo2[110][50];
0037
0038 for(int i=0;i<100;i++){
0039 char str0[6];
0040 char str1[6];
0041 for(int j=0;j<50;j++){
0042
0043 int k = i*10000+j;
0044 sprintf(str0,"enpl%d",k);
0045 sprintf(str1,"enmin%d",k);
0046
0047 hCalo1[i][j] = new TH1F(str0, "enpl", 300, 0.1665, 100.1665);
0048 hCalo2[i][j] = new TH1F(str1, "enmin", 300, 0.1665, 100.1665);
0049 }
0050 }
0051
0052 Long64_t nbytes = 0, nb = 0;
0053 for (Long64_t jentry=0; jentry<nentries;jentry++) {
0054 Long64_t ientry = LoadTree(jentry);
0055 if (ientry < 0) break;
0056 nb = fChain->GetEntry(jentry); nbytes += nb;
0057
0058
0059
0060 if(ieta<0) hCalo1[iphi][abs(ieta)]->Fill(mom1);
0061 if(ieta>=0) hCalo2[iphi][ieta]->Fill(mom1);
0062 if ( ieta == -2 && iphi == 35 ) cout<<" "<<mom1<<endl;
0063 if ( ieta == 2 && iphi == 35 ) cout<<" "<<mom1<<endl;
0064 if ( mom1 > 1. ) cout<<mom1<<endl;
0065
0066 }
0067 hCalo1[35][2]->Draw();
0068 }