Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:19

0001 {
0002 gROOT->Reset();
0003 gROOT->SetStyle("Plain");
0004 
0005 gStyle->SetOptStat(1111);
0006 gStyle->SetOptFit(111);
0007      
0008 
0009 TH1F  *h1etacoefmin1a = new TH1F("h1etacoefmin1a", "h1etacoefmin1a", 100, 0.6, 1.4);
0010 TH1F  *h1etacoefmin2a = new TH1F("h1etacoefmin2a", "h1etacoefmin2a", 100, 0.6, 1.4);
0011 TH1F  *h1etacoefmin3a = new TH1F("h1etacoefmin3a", "h1etacoefmin3a", 100, 0.6, 1.4);
0012 TH1F  *h1etacoefmin4a = new TH1F("h1etacoefmin4a", "h1etacoefmin4a", 100, 0.6, 1.4);
0013 TH1F  *h1etacoefmin5a = new TH1F("h1etacoefmin5a", "h1etacoefmin5a", 100, 0.6, 1.4);
0014 TH1F  *h1etacoefmin6a = new TH1F("h1etacoefmin6a", "h1etacoefmin6a", 100, 0.6, 1.4);
0015 TH1F  *h1etacoefmin7a = new TH1F("h1etacoefmin7a", "h1etacoefmin7a", 100, 0.6, 1.4);
0016 TH1F  *h1etacoefmin8a = new TH1F("h1etacoefmin8a", "h1etacoefmin8a", 100, 0.6, 1.4);
0017 TH1F  *h1etacoefmin9a = new TH1F("h1etacoefmin9a", "h1etacoefmin9a", 100, 0.7, 1.3);
0018 TH1F  *h1etacoefmin10a = new TH1F("h1etacoefmin10a", "h1etacoefmin10a", 100, 0.7, 1.3);
0019 TH1F  *h1etacoefmin11a = new TH1F("h1etacoefmin11a", "h1etacoefmin11a", 100, 0.7, 1.3);
0020 TH1F  *h1etacoefmin12a = new TH1F("h1etacoefmin12a", "h1etacoefmin12a", 100, 0.7, 1.3);
0021 TH1F  *h1etacoefmin13a = new TH1F("h1etacoefmin13a", "h1etacoefmin13a", 100, 0.7, 1.3);
0022 TH1F  *h1etacoefmin14a = new TH1F("h1etacoefmin14a", "h1etacoefmin14a", 100, 0.7, 1.3);
0023 TH1F  *h1etacoefmin15a = new TH1F("h1etacoefmin15a", "h1etacoefmin15a", 100, 0., 2.);
0024 TH1F  *h1etacoefmin16_1a = new TH1F("h1etacoefmin16_1a", "h1etacoefmin16_1a", 100, 0., 2.);
0025 TH1F  *h1etacoefmin16_2a = new TH1F("h1etacoefmin16_2a", "h1etacoefmin16_2a", 100, 0., 2.);
0026 
0027 
0028 
0029 TH1F  *h1etacoefmin1b = new TH1F("h1etacoefmin1b", "h1etacoefmin1b", 100, 0.6, 1.4);
0030 TH1F  *h1etacoefmin2b = new TH1F("h1etacoefmin2b", "h1etacoefmin2b", 100, 0.6, 1.4);
0031 TH1F  *h1etacoefmin2bn = new TH1F("h1etacoefmin2bn", "h1etacoefmin2bn", 100, 0.6, 1.4);
0032 TH1F  *h1etacoefmin3b = new TH1F("h1etacoefmin3b", "h1etacoefmin3b", 100, 0.6, 1.4);
0033 TH1F  *h1etacoefmin3bn = new TH1F("h1etacoefmin3bn", "h1etacoefmin3bn", 100, 0.6, 1.4);
0034 TH1F  *h1etacoefmin4b = new TH1F("h1etacoefmin4b", "h1etacoefmin4b", 100, 0.6, 1.4);
0035 TH1F  *h1etacoefmin4bn = new TH1F("h1etacoefmin4bn", "h1etacoefmin4bn", 100, 0.6, 1.4);
0036 TH1F  *h1etacoefmin5b = new TH1F("h1etacoefmin5b", "h1etacoefmin5b", 100, 0.6, 1.4);
0037 TH1F  *h1etacoefmin6b = new TH1F("h1etacoefmin6b", "h1etacoefmin6b", 100, 0.6, 1.4);
0038 TH1F  *h1etacoefmin7b = new TH1F("h1etacoefmin7b", "h1etacoefmin7b", 100, 0.6, 1.4);
0039 TH1F  *h1etacoefmin8b = new TH1F("h1etacoefmin8b", "h1etacoefmin8b", 100, 0.6, 1.4);
0040 TH1F  *h1etacoefmin9b = new TH1F("h1etacoefmin9b", "h1etacoefmin9b", 100, 0.7, 1.3);
0041 TH1F  *h1etacoefmin10b = new TH1F("h1etacoefmin10b", "h1etacoefmin10b", 100, 0.7, 1.3);
0042 TH1F  *h1etacoefmin11b = new TH1F("h1etacoefmin11b", "h1etacoefmin11b", 100, 0.7, 1.3);
0043 TH1F  *h1etacoefmin12b = new TH1F("h1etacoefmin12b", "h1etacoefmin12b", 100, 0.7, 1.3);
0044 TH1F  *h1etacoefmin13b = new TH1F("h1etacoefmin13b", "h1etacoefmin13b", 100, 0.7, 1.3);
0045 TH1F  *h1etacoefmin14b = new TH1F("h1etacoefmin14b", "h1etacoefmin14b", 100, 0.7, 1.3);
0046 TH1F  *h1etacoefmin15b = new TH1F("h1etacoefmin15b", "h1etacoefmin15b", 100, 0., 2.);
0047 TH1F  *h1etacoefmin16_1b = new TH1F("h1etacoefmin16_1b", "h1etacoefmin16_1b", 100, 0., 2.);
0048 TH1F  *h1etacoefmin16_2b = new TH1F("h1etacoefmin16_2b", "h1etacoefmin16_2b", 100, 0., 2.);
0049 
0050 //
0051 TH1F  *h1etacoefmin1 = new TH1F("h1etacoefmin1", "h1etacoefmin1", 100, 0.6, 1.4);
0052 TH1F  *h1etacoefmin1l = new TH1F("h1etacoefmin1l", "h1etacoefmin1l", 100, 0.6, 1.4);
0053 TH1F  *h1etacoefmin2 = new TH1F("h1etacoefmin2", "h1etacoefmin2", 100, 0.6, 1.4);
0054 TH1F  *h1etacoefmin2l = new TH1F("h1etacoefmin2l", "h1etacoefmin2l", 100, 0.6, 1.4);
0055 TH1F  *h1etacoefmin3 = new TH1F("h1etacoefmin3", "h1etacoefmin3", 100, 0.6, 1.4);
0056 TH1F  *h1etacoefmin3l = new TH1F("h1etacoefmin3l", "h1etacoefmin3l", 100, 0.6, 1.4);
0057 TH1F  *h1etacoefmin4 = new TH1F("h1etacoefmin4", "h1etacoefmin4", 100, 0.6, 1.4);
0058 TH1F  *h1etacoefmin4l = new TH1F("h1etacoefmin4l", "h1etacoefmin4l", 100, 0.6, 1.4);
0059 TH1F  *h1etacoefmin5 = new TH1F("h1etacoefmin5", "h1etacoefmin5", 100, 0.6, 1.4);
0060 TH1F  *h1etacoefmin5l = new TH1F("h1etacoefmin5l", "h1etacoefmin5l", 100, 0.6, 1.4);
0061 TH1F  *h1etacoefmin6 = new TH1F("h1etacoefmin6", "h1etacoefmin6", 100, 0.6, 1.4);
0062 TH1F  *h1etacoefmin6l = new TH1F("h1etacoefmin6l", "h1etacoefmin6l", 100, 0.6, 1.4);
0063 TH1F  *h1etacoefmin7 = new TH1F("h1etacoefmin7", "h1etacoefmin7", 100, 0.6, 1.4);
0064 TH1F  *h1etacoefmin7l = new TH1F("h1etacoefmin7l", "h1etacoefmin7l", 100, 0.6, 1.4);
0065 TH1F  *h1etacoefmin8 = new TH1F("h1etacoefmin8", "h1etacoefmin8", 100, 0.6, 1.4);
0066 TH1F  *h1etacoefmin8l = new TH1F("h1etacoefmin8l", "h1etacoefmin8l", 100, 0.6, 1.4);
0067 TH1F  *h1etacoefmin9 = new TH1F("h1etacoefmin9", "h1etacoefmin9", 100, 0.7, 1.3);
0068 TH1F  *h1etacoefmin9l = new TH1F("h1etacoefmin9l", "h1etacoefmin9l", 100, 0.7, 1.3);
0069 TH1F  *h1etacoefmin10 = new TH1F("h1etacoefmin10", "h1etacoefmin10", 100, 0.7, 1.3);
0070 TH1F  *h1etacoefmin10l = new TH1F("h1etacoefmin10l", "h1etacoefmin10l", 100, 0.7, 1.3);
0071 TH1F  *h1etacoefmin11 = new TH1F("h1etacoefmin11", "h1etacoefmin11", 100, 0.7, 1.3);
0072 TH1F  *h1etacoefmin11l = new TH1F("h1etacoefmin11l", "h1etacoefmin11l", 100, 0.7, 1.3);
0073 TH1F  *h1etacoefmin12 = new TH1F("h1etacoefmin12", "h1etacoefmin12", 100, 0.7, 1.3);
0074 TH1F  *h1etacoefmin12l = new TH1F("h1etacoefmin12l", "h1etacoefmin12l", 100, 0.7, 1.3);
0075 TH1F  *h1etacoefmin13 = new TH1F("h1etacoefmin13", "h1etacoefmin13", 100, 0.7, 1.3);
0076 TH1F  *h1etacoefmin13l = new TH1F("h1etacoefmin13l", "h1etacoefmin13l", 100, 0.7, 1.3);
0077 TH1F  *h1etacoefmin14 = new TH1F("h1etacoefmin14", "h1etacoefmin14", 100, 0.7, 1.3);
0078 TH1F  *h1etacoefmin14l = new TH1F("h1etacoefmin14l", "h1etacoefmin14l", 100, 0.7, 1.3);
0079 TH1F  *h1etacoefmin15 = new TH1F("h1etacoefmin15", "h1etacoefmin15", 100, 0.7, 1.3);
0080 TH1F  *h1etacoefmin15l = new TH1F("h1etacoefmin15l", "h1etacoefmin15l", 100, 0.7, 1.3);
0081 TH1F  *h1etacoefmin16_1 = new TH1F("h1etacoefmin16_1", "h1etacoefmin16_1", 100, 0.7, 1.3);
0082 TH1F  *h1etacoefmin16_1l = new TH1F("h1etacoefmin16_1l", "h1etacoefmin16_1l", 100, 0.7, 1.3);
0083 
0084 TH1F  *h1etacoefmin16_2 = new TH1F("h1etacoefmin16_2", "h1etacoefmin16_2", 100, 0.7, 1.3);
0085 TH1F  *h1etacoefmin16_2l = new TH1F("h1etacoefmin16_2l", "h1etacoefmin16_2l", 100, 0.7, 1.3);
0086 //
0087 TH2F  *h2etacoefmin1a = new TH2F("h2etacoefmin1a", "h2etacoefmin1a", 72, 0.5, 72.5, 100, 0.6, 1.4);
0088 TH2F  *h2etacoefmin2a = new TH2F("h2etacoefmin2a", "h2etacoefmin2a", 72, 0.5, 72.5, 100, 0.6, 1.4);
0089 TH2F  *h2etacoefmin3a = new TH2F("h2etacoefmin3a", "h2etacoefmin3a", 72, 0.5, 72.5, 100, 0.6, 1.4);
0090 TH2F  *h2etacoefmin4a = new TH2F("h2etacoefmin4a", "h2etacoefmin4a", 72, 0.5, 72.5, 100, 0.6, 1.4);
0091 TH2F  *h2etacoefmin5a = new TH2F("h2etacoefmin5a", "h2etacoefmin5a", 72, 0.5, 72.5, 100, 0.6, 1.4);
0092 TH2F  *h2etacoefmin6a = new TH2F("h2etacoefmin6a", "h2etacoefmin6a", 72, 0.5, 72.5, 100, 0.6, 1.4);
0093 TH2F  *h2etacoefmin7a = new TH2F("h2etacoefmin7a", "h2etacoefmin7a", 72, 0.5, 72.5,100, 0.6, 1.4);
0094 TH2F  *h2etacoefmin8a = new TH2F("h2etacoefmin8a", "h2etacoefmin8a", 72, 0.5, 72.5,100, 0.6, 1.4);
0095 TH2F  *h2etacoefmin9a = new TH2F("h2etacoefmin9a", "h2etacoefmin9a", 72, 0.5, 72.5,100, 0.7, 1.3);
0096 TH2F  *h2etacoefmin10a = new TH2F("h2etacoefmin10a", "h2etacoefmin10a", 72, 0.5, 72.5,100, 0.7, 1.3);
0097 TH2F  *h2etacoefmin11a = new TH2F("h2etacoefmin11a", "h2etacoefmin11a", 72, 0.5, 72.5,100, 0.7, 1.3);
0098 TH2F  *h2etacoefmin12a = new TH2F("h2etacoefmin12a", "h2etacoefmin12a", 72, 0.5, 72.5,100, 0.7, 1.3);
0099 TH2F  *h2etacoefmin13a = new TH2F("h2etacoefmin13a", "h2etacoefmin13a", 72, 0.5, 72.5,100, 0.7, 1.3);
0100 TH2F  *h2etacoefmin14a = new TH2F("h2etacoefmin14a", "h2etacoefmin14a", 72, 0.5, 72.5,100, 0.7, 1.3);
0101 TH2F  *h2etacoefmin15a = new TH2F("h2etacoefmin15a", "h2etacoefmin15a", 72, 0.5, 72.5,100, 0., 2.);
0102 TH2F  *h2etacoefmin16_1a = new TH2F("h2etacoefmin16_1a", "h2etacoefmin16_1a", 72, 0.5, 72.5,100, 0., 2.);
0103 TH2F  *h2etacoefmin16_2a = new TH2F("h2etacoefmin16_2a", "h2etacoefmin16_2a", 72, 0.5, 72.5,100, 0., 2.);
0104 //
0105 TH2F  *h2etacoefmin1b = new TH2F("h2etacoefmin1b", "h2etacoefmin1b", 72, 0.5, 72.5, 100, 0.6, 1.4);
0106 TH2F  *h2etacoefmin2b = new TH2F("h2etacoefmin2b", "h2etacoefmin2b", 72, 0.5, 72.5, 100, 0.6, 1.4);
0107 TH2F  *h2etacoefmin3b = new TH2F("h2etacoefmin3b", "h2etacoefmin3b", 72, 0.5, 72.5, 100, 0.6, 1.4);
0108 TH2F  *h2etacoefmin4b = new TH2F("h2etacoefmin4b", "h2etacoefmin4b", 72, 0.5, 72.5, 100, 0.6, 1.4);
0109 TH2F  *h2etacoefmin5b = new TH2F("h2etacoefmin5b", "h2etacoefmin5b", 72, 0.5, 72.5, 100, 0.6, 1.4);
0110 TH2F  *h2etacoefmin6b = new TH2F("h2etacoefmin6b", "h2etacoefmin6b", 72, 0.5, 72.5, 100, 0.6, 1.4);
0111 TH2F  *h2etacoefmin7b = new TH2F("h2etacoefmin7b", "h2etacoefmin7b", 72, 0.5, 72.5,100, 0.6, 1.4);
0112 TH2F  *h2etacoefmin8b = new TH2F("h2etacoefmin8b", "h2etacoefmin8b", 72, 0.5, 72.5,100, 0.6, 1.4);
0113 TH2F  *h2etacoefmin9b = new TH2F("h2etacoefmin9b", "h2etacoefmin9b", 72, 0.5, 72.5,100, 0.7, 1.3);
0114 TH2F  *h2etacoefmin10b = new TH2F("h2etacoefmin10b", "h2etacoefmin10b", 72, 0.5, 72.5,100, 0.7, 1.3);
0115 TH2F  *h2etacoefmin11b = new TH2F("h2etacoefmin11b", "h2etacoefmin11b", 72, 0.5, 72.5,100, 0.7, 1.3);
0116 TH2F  *h2etacoefmin12b = new TH2F("h2etacoefmin12b", "h2etacoefmin12b", 72, 0.5, 72.5,100, 0.7, 1.3);
0117 TH2F  *h2etacoefmin13b = new TH2F("h2etacoefmin13b", "h2etacoefmin13b", 72, 0.5, 72.5,100, 0.7, 1.3);
0118 TH2F  *h2etacoefmin14b = new TH2F("h2etacoefmin14b", "h2etacoefmin14b", 72, 0.5, 72.5,100, 0.7, 1.3);
0119 TH2F  *h2etacoefmin15b = new TH2F("h2etacoefmin15b", "h2etacoefmin15b", 72, 0.5, 72.5,100, 0., 2.);
0120 TH2F  *h2etacoefmin16_1b = new TH2F("h2etacoefmin16_1b", "h2etacoefmin16_1b", 72, 0.5, 72.5,100, 0., 2.);
0121 TH2F  *h2etacoefmin16_2b = new TH2F("h2etacoefmin16_2b", "h2etacoefmin16_2b", 72, 0.5, 72.5,100, 0., 2.);
0122 
0123 //
0124 TH2F  *h2etacoefmin1 = new TH2F("h2etacoefmin1", "h2etacoefmin1", 72, 0.5, 72.5, 100, 0.6, 1.4);
0125 TH2F  *h2etacoefmin2 = new TH2F("h2etacoefmin2", "h2etacoefmin2", 72, 0.5, 72.5, 100, 0.6, 1.4);
0126 TH2F  *h2etacoefmin3 = new TH2F("h2etacoefmin3", "h2etacoefmin3", 72, 0.5, 72.5, 100, 0.6, 1.4);
0127 TH2F  *h2etacoefmin4 = new TH2F("h2etacoefmin4", "h2etacoefmin4", 72, 0.5, 72.5, 100, 0.6, 1.4);
0128 TH2F  *h2etacoefmin5 = new TH2F("h2etacoefmin5", "h2etacoefmin5", 72, 0.5, 72.5, 100, 0.6, 1.4);
0129 TH2F  *h2etacoefmin6 = new TH2F("h2etacoefmin6", "h2etacoefmin6", 72, 0.5, 72.5, 100, 0.6, 1.4);
0130 TH2F  *h2etacoefmin7 = new TH2F("h2etacoefmin7", "h2etacoefmin7", 72, 0.5, 72.5,100, 0.6, 1.4);
0131 TH2F  *h2etacoefmin8 = new TH2F("h2etacoefmin8", "h2etacoefmin8", 72, 0.5, 72.5,100, 0.6, 1.4);
0132 TH2F  *h2etacoefmin9 = new TH2F("h2etacoefmin9", "h2etacoefmin9", 72, 0.5, 72.5,100, 0.7, 1.3);
0133 TH2F  *h2etacoefmin10 = new TH2F("h2etacoefmin10", "h2etacoefmin10", 72, 0.5, 72.5,100, 0.7, 1.3);
0134 TH2F  *h2etacoefmin11 = new TH2F("h2etacoefmin11", "h2etacoefmin11", 72, 0.5, 72.5,100, 0.7, 1.3);
0135 TH2F  *h2etacoefmin12 = new TH2F("h2etacoefmin12", "h2etacoefmin12", 72, 0.5, 72.5,100, 0.7, 1.3);
0136 TH2F  *h2etacoefmin13 = new TH2F("h2etacoefmin13", "h2etacoefmin13", 72, 0.5, 72.5,100, 0.7, 1.3);
0137 TH2F  *h2etacoefmin14 = new TH2F("h2etacoefmin14", "h2etacoefmin14", 72, 0.5, 72.5,100, 0.7, 1.3);
0138 TH2F  *h2etacoefmin15 = new TH2F("h2etacoefmin15", "h2etacoefmin15", 72, 0.5, 72.5,100, 0., 2.);
0139 TH2F  *h2etacoefmin16_1 = new TH2F("h2etacoefmin16_1", "h2etacoefmin16_1", 72, 0.5, 72.5,100, 0., 2.);
0140 TH2F  *h2etacoefmin16_2 = new TH2F("h2etacoefmin16_2", "h2etacoefmin16_2", 72, 0.5, 72.5,100, 0., 2.);
0141 
0142 cout<<" Book histos "<<endl;
0143 
0144 std::string line;
0145 std::ifstream in20( "coefficients_8.9mln.txt" );
0146 
0147 Int_t i11 = 0;
0148 
0149 Int_t maxc[36] = {1,4,5,8,9,12,13,16,17,20,21,24,25,28,29,32,33,36,37,40,41,44,45,48,49,52,53,56,57,60,61,64,65,68,69,72};
0150 
0151 while( std::getline( in20, line)){
0152 int subd,eta,phi,dep;
0153 Float_t var,err;
0154 istringstream linestream(line);
0155 linestream>>subd>>dep>>eta>>phi>>var>>err;
0156 //cout<<"eta "<<eta<<endl;
0157   if(subd==1) {
0158     
0159      if( phi == maxc[i11]) {
0160        if(dep == 1 && eta == 1) {
0161    //    cout<<" 1 Phi saved "<< phi<<endl;
0162        h1etacoefmin1a->Fill(var);
0163        h2etacoefmin1a->Fill(phi,var);
0164        i11++;
0165        if(i11 == 36) i11=0;
0166        }
0167        if(dep == 1 && eta == 2) {
0168     //   cout<<" 2 Phi saved "<< phi<<endl;
0169        h1etacoefmin2a->Fill(var);
0170        h2etacoefmin2a->Fill(phi,var);
0171        i11++;
0172        if(i11 == 36) i11=0;
0173        
0174        }
0175        if(dep == 1 && eta == 3) {
0176     //   cout<<" 3 Phi saved "<< phi<<endl;
0177        h1etacoefmin3a->Fill(var);
0178        h2etacoefmin3a->Fill(phi,var);
0179        i11++;
0180        if(i11 == 36) i11=0;
0181        
0182        }
0183        if(dep == 1 && eta == 4) {
0184     //   cout<<" 4 Phi saved "<< phi<<endl;
0185        h1etacoefmin4a->Fill(var);
0186        h2etacoefmin4a->Fill(phi,var);
0187        i11++;
0188        if(i11 == 36) i11=0;
0189        
0190        }
0191        if(dep == 1 && eta == 5) {
0192      //  cout<<" 5 Phi saved "<< phi<<endl;
0193        h1etacoefmin5a->Fill(var);
0194        h2etacoefmin5a->Fill(phi,var);
0195        i11++;
0196        if(i11 == 36) i11=0;
0197        
0198        }
0199        if(dep == 1 && eta == 6) {
0200      //  cout<<" 6 Phi saved "<< phi<<endl;
0201        h1etacoefmin6a->Fill(var);
0202        h2etacoefmin6a->Fill(phi,var);
0203        i11++;
0204        if(i11 == 36) i11=0;
0205        
0206        }
0207        if(dep == 1 && eta == 7) {
0208      //  cout<<" 7 Phi saved "<< phi<<endl;
0209        h1etacoefmin7a->Fill(var);
0210        h2etacoefmin7a->Fill(phi,var);
0211        i11++;
0212        if(i11 == 36) i11=0;
0213        
0214        }
0215        if(dep == 1 && eta == 8) {
0216      //  cout<<" 8 Phi saved "<< phi<<endl;
0217        h1etacoefmin8a->Fill(var);
0218        h2etacoefmin8a->Fill(phi,var);
0219        i11++;
0220        if(i11 == 36) i11=0;
0221        
0222        }
0223        if(dep == 1 && eta == 9) {
0224      //  cout<<" 9 Phi saved "<< phi<<endl;
0225        h1etacoefmin9a->Fill(var);
0226        h2etacoefmin9a->Fill(phi,var);
0227        i11++;
0228        if(i11 == 36) i11=0;
0229        
0230        }
0231        if(dep == 1 && eta == 10) {
0232       // cout<<" 10 Phi saved "<< phi<<endl;
0233        h1etacoefmin10a->Fill(var);
0234        h2etacoefmin10a->Fill(phi,var);
0235        i11++;
0236        if(i11 == 36) i11=0;
0237        
0238        }
0239        if(dep == 1 && eta == 11) {
0240       // cout<<" 11 Phi saved "<< phi<<endl;
0241        h1etacoefmin11a->Fill(var);
0242        h2etacoefmin11a->Fill(phi,var);
0243        i11++;
0244        if(i11 == 36) i11=0;
0245        
0246        }
0247        if(dep == 1 && eta == 12) {
0248       // cout<<" 12 Phi saved "<< phi<<endl;
0249        h1etacoefmin12a->Fill(var);
0250        h2etacoefmin12a->Fill(phi,var);
0251        i11++;
0252        if(i11 == 36) i11=0;
0253        
0254        }
0255        if(dep == 1 && eta == 13) {
0256       // cout<<" 13 Phi saved "<< phi<<endl;
0257        h1etacoefmin13a->Fill(var);
0258        h2etacoefmin13a->Fill(phi,var);
0259        i11++;
0260        if(i11 == 36) i11=0;
0261        
0262        }
0263        if(dep == 1 && eta == 14) {
0264       // cout<<" 14 Phi saved "<< phi<<endl;
0265        h1etacoefmin14a->Fill(var);
0266        h2etacoefmin14a->Fill(phi,var);
0267        i11++;
0268        if(i11 == 36) i11=0;
0269        
0270        }
0271        if(dep == 1 && eta == 15) {
0272      //  cout<<" 15 Phi saved "<< phi<<endl;
0273        h1etacoefmin15a->Fill(var);
0274        h2etacoefmin15a->Fill(phi,var);
0275        i11++;
0276        if(i11 == 36) i11=0;
0277        
0278        }
0279        if(dep == 1 && eta == 16) {
0280       // cout<<" 16 Phi saved "<< phi<<endl;
0281        h1etacoefmin16_1a->Fill(var);
0282        h2etacoefmin16_1a->Fill(phi,var);
0283        i11++;
0284        }
0285      } else{
0286        if(dep == 1 && eta == 1) {
0287        h1etacoefmin1b->Fill(var);
0288        h2etacoefmin1b->Fill(phi,var);
0289        }
0290        if(dep == 1 && eta == 2) {
0291        h1etacoefmin2b->Fill(var);
0292        h2etacoefmin2b->Fill(phi,var);
0293        if( var > 0.95 ) h1etacoefmin2bn->Fill(var);
0294        }
0295        if(dep == 1 && eta == 3) {
0296        h1etacoefmin3b->Fill(var);
0297        h2etacoefmin3b->Fill(phi,var);
0298        if( var > 0.9 ) h1etacoefmin3bn->Fill(var);
0299        }
0300        if(dep == 1 && eta == 4) {
0301        h1etacoefmin4b->Fill(var);
0302        h2etacoefmin4b->Fill(phi,var);
0303        if( var > 0.9 ) h1etacoefmin4bn->Fill(var);
0304        }
0305        if(dep == 1 && eta == 5) {
0306        h1etacoefmin5b->Fill(var);
0307        h2etacoefmin5b->Fill(phi,var);
0308        }
0309         if(dep == 1 && eta == 6) {
0310        h1etacoefmin6b->Fill(var);
0311        h2etacoefmin6b->Fill(phi,var);
0312        }
0313        if(dep == 1 && eta == 7) {
0314        h1etacoefmin7b->Fill(var);
0315        h2etacoefmin7b->Fill(phi,var);
0316        }
0317        if(dep == 1 && eta == 8) {
0318        h1etacoefmin8b->Fill(var);
0319        h2etacoefmin8b->Fill(phi,var);
0320        }
0321        if(dep == 1 && eta == 9) {
0322        h1etacoefmin9b->Fill(var);
0323        h2etacoefmin9b->Fill(phi,var);
0324        }
0325        if(dep == 1 && eta == 10) {
0326        h1etacoefmin10b->Fill(var);
0327        h2etacoefmin10b->Fill(phi,var);
0328        }
0329        if(dep == 1 && eta == 11) {
0330        h1etacoefmin11b->Fill(var);
0331        h2etacoefmin11b->Fill(phi,var);
0332        }
0333        if(dep == 1 && eta == 12) {
0334        h1etacoefmin12b->Fill(var);
0335        h2etacoefmin12b->Fill(phi,var);
0336        }
0337        if(dep == 1 && eta == 13) {
0338        h1etacoefmin13b->Fill(var);
0339        h2etacoefmin13b->Fill(phi,var);
0340        }
0341        if(dep == 1 && eta == 14) {
0342        h1etacoefmin14b->Fill(var);
0343        h2etacoefmin14b->Fill(phi,var);
0344        }
0345        if(dep == 1 && eta == 15) {
0346        h1etacoefmin15b->Fill(var);
0347        h2etacoefmin15b->Fill(phi,var);
0348        }
0349        if(dep == 1 && eta == 16) {
0350        h1etacoefmin16_1b->Fill(var);
0351        h2etacoefmin16_1b->Fill(phi,var);
0352        }
0353       
0354      }  
0355 
0356     if(dep == 1 && eta == 1) {h2etacoefmin1->Fill(phi,var);}
0357     if(dep == 1 && eta == 2) {h2etacoefmin2->Fill(phi,var);}
0358     if(dep == 1 && eta == 3) {h2etacoefmin3->Fill(phi,var);}
0359     if(dep == 1 && eta == 4) {h2etacoefmin4->Fill(phi,var);} 
0360     if(dep == 1 && eta == 5) {h2etacoefmin5->Fill(phi,var);}
0361     if(dep == 1 && eta == 6) {h2etacoefmin6->Fill(phi,var);}
0362     if(dep == 1 && eta == 7) {h2etacoefmin7->Fill(phi,var);}
0363     if(dep == 1 && eta == 8) {h2etacoefmin8->Fill(phi,var);} 
0364     if(dep == 1 && eta == 9) {h2etacoefmin9->Fill(phi,var);} 
0365     if(dep == 1 && eta == 10) {h2etacoefmin10->Fill(phi,var);}       
0366     if(dep == 1 && eta == 11) {h2etacoefmin11->Fill(phi,var);}
0367     if(dep == 1 && eta == 12) {h2etacoefmin12->Fill(phi,var);} 
0368     if(dep == 1 && eta == 13) {h2etacoefmin13->Fill(phi,var);} 
0369     if(dep == 1 && eta == 14) {h2etacoefmin14->Fill(phi,var);}
0370     if(dep == 1 && eta == 15) {h2etacoefmin15->Fill(phi,var);}
0371     if(dep == 1 && eta == 16) {h2etacoefmin16_1->Fill(phi,var);}
0372     if(dep == 2 && eta == 16) {h2etacoefmin16_2->Fill(phi,var);}
0373 
0374         
0375     if(dep == 1 && eta == 1) {h1etacoefmin1->Fill(var); if( var > 0.95 && var < 1.1) h1etacoefmin1l->Fill(var);}
0376     if(dep == 1 && eta == 2) {h1etacoefmin2->Fill(var); if( var > 0.95 && var < 1.1) h1etacoefmin2l->Fill(var);}
0377     if(dep == 1 && eta == 3) {h1etacoefmin3->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin3l->Fill(var);}
0378     if(dep == 1 && eta == 4) {h1etacoefmin4->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin4l->Fill(var);} 
0379     if(dep == 1 && eta == 5) {h1etacoefmin5->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin5l->Fill(var);}
0380     if(dep == 1 && eta == 6) {h1etacoefmin6->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin6l->Fill(var);}
0381     if(dep == 1 && eta == 7) {h1etacoefmin7->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin7l->Fill(var);}
0382     if(dep == 1 && eta == 8) {h1etacoefmin8->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin8l->Fill(var);} 
0383     if(dep == 1 && eta == 9) {h1etacoefmin9->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin9l->Fill(var);} 
0384     if(dep == 1 && eta == 10) {h1etacoefmin10->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin10l->Fill(var);}       
0385     if(dep == 1 && eta == 11) {h1etacoefmin11->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin11l->Fill(var); if(var>1.) cout<<"phi= "<<phi<<endl;}
0386     if(dep == 1 && eta == 12) {h1etacoefmin12->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin12l->Fill(var);} 
0387     if(dep == 1 && eta == 13) {h1etacoefmin13->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin13l->Fill(var);} 
0388     if(dep == 1 && eta == 14) {h1etacoefmin14->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin14l->Fill(var);}
0389     if(dep == 1 && eta == 15) {h1etacoefmin15->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin15l->Fill(var);}
0390     if(dep == 1 && eta == 16) {h1etacoefmin16_1->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin16_1l->Fill(var);}
0391     if(dep == 2 && eta == 16) {h1etacoefmin16_2->Fill(var);if( var > 0.95 && var < 1.1) h1etacoefmin16_2l->Fill(var);}
0392     
0393   } // subd = 1
0394   if( subd > 1 ) break;
0395 }
0396 
0397 
0398 TFile efile("coefficients_219_val_barrel_plus_8.9mln.root","recreate");
0399 
0400 h1etacoefmin1a->Write();
0401 h1etacoefmin1a->Write();
0402 h1etacoefmin2a->Write();
0403 h1etacoefmin3a->Write();
0404 h1etacoefmin4a->Write();
0405 h1etacoefmin5a->Write();
0406 h1etacoefmin6a->Write();
0407 h1etacoefmin7a->Write();
0408 h1etacoefmin8a->Write();
0409 h1etacoefmin9a->Write();
0410 h1etacoefmin10a->Write();
0411 h1etacoefmin11a->Write();
0412 h1etacoefmin12a->Write();
0413 h1etacoefmin13a->Write();
0414 h1etacoefmin14a->Write();
0415 h1etacoefmin15a->Write();
0416 h1etacoefmin16_1a->Write();
0417 h1etacoefmin16_2a->Write();
0418 
0419 h1etacoefmin1b->Write();
0420 h1etacoefmin2b->Write();h1etacoefmin2bn->Write();
0421 h1etacoefmin3b->Write();h1etacoefmin3bn->Write();
0422 h1etacoefmin4b->Write();h1etacoefmin4bn->Write();
0423 h1etacoefmin5b->Write();
0424 h1etacoefmin6b->Write();
0425 h1etacoefmin7b->Write();
0426 h1etacoefmin8b->Write();
0427 h1etacoefmin9b->Write();
0428 h1etacoefmin10b->Write();
0429 h1etacoefmin11b->Write();
0430 h1etacoefmin12b->Write();
0431 h1etacoefmin13b->Write();
0432 h1etacoefmin14b->Write();
0433 h1etacoefmin15b->Write();
0434 h1etacoefmin16_1b->Write();
0435 h1etacoefmin16_2b->Write();
0436 
0437 h1etacoefmin1->Write(); h1etacoefmin1l->Write();
0438 h1etacoefmin2->Write(); h1etacoefmin2l->Write();
0439 h1etacoefmin3->Write();h1etacoefmin3l->Write();
0440 h1etacoefmin4->Write();h1etacoefmin4l->Write();
0441 h1etacoefmin5->Write();h1etacoefmin5l->Write();
0442 h1etacoefmin6->Write();h1etacoefmin6l->Write();
0443 h1etacoefmin7->Write();h1etacoefmin7l->Write();
0444 h1etacoefmin8->Write();h1etacoefmin8l->Write();
0445 h1etacoefmin9->Write();h1etacoefmin9l->Write();
0446 h1etacoefmin10->Write();h1etacoefmin10l->Write();
0447 h1etacoefmin11->Write();h1etacoefmin11l->Write();
0448 h1etacoefmin12->Write();h1etacoefmin12l->Write();
0449 h1etacoefmin13->Write();h1etacoefmin13l->Write();
0450 h1etacoefmin14->Write();h1etacoefmin14l->Write();
0451 h1etacoefmin15->Write();h1etacoefmin15l->Write();
0452 h1etacoefmin16_1->Write();h1etacoefmin16_1l->Write();
0453 h1etacoefmin16_2->Write();h1etacoefmin16_2l->Write();
0454 
0455 
0456 
0457 h2etacoefmin1a->Write();
0458 h2etacoefmin1a->Write();
0459 h2etacoefmin2a->Write();
0460 h2etacoefmin3a->Write();
0461 h2etacoefmin4a->Write();
0462 h2etacoefmin5a->Write();
0463 h2etacoefmin6a->Write();
0464 h2etacoefmin7a->Write();
0465 h2etacoefmin8a->Write();
0466 h2etacoefmin9a->Write();
0467 h2etacoefmin10a->Write();
0468 h2etacoefmin11a->Write();
0469 h2etacoefmin12a->Write();
0470 h2etacoefmin13a->Write();
0471 h2etacoefmin14a->Write();
0472 h2etacoefmin15a->Write();
0473 h2etacoefmin16_1a->Write();
0474 h2etacoefmin16_2a->Write();
0475 
0476 h2etacoefmin1b->Write();
0477 h2etacoefmin2b->Write();
0478 h2etacoefmin3b->Write();
0479 h2etacoefmin4b->Write();
0480 h2etacoefmin5b->Write();
0481 h2etacoefmin6b->Write();
0482 h2etacoefmin7b->Write();
0483 h2etacoefmin8b->Write();
0484 h2etacoefmin9b->Write();
0485 h2etacoefmin10b->Write();
0486 h2etacoefmin11b->Write();
0487 h2etacoefmin12b->Write();
0488 h2etacoefmin13b->Write();
0489 h2etacoefmin14b->Write();
0490 h2etacoefmin15b->Write();
0491 h2etacoefmin16_1b->Write();
0492 h2etacoefmin16_2b->Write();
0493 
0494 h2etacoefmin1->Write();
0495 h2etacoefmin2->Write();
0496 h2etacoefmin3->Write();
0497 h2etacoefmin4->Write();
0498 h2etacoefmin5->Write();
0499 h2etacoefmin6->Write();
0500 h2etacoefmin7->Write();
0501 h2etacoefmin8->Write();
0502 h2etacoefmin9->Write();
0503 h2etacoefmin10->Write();
0504 h2etacoefmin11->Write();
0505 h2etacoefmin12->Write();
0506 h2etacoefmin13->Write();
0507 h2etacoefmin14->Write();
0508 h2etacoefmin15->Write();
0509 h2etacoefmin16_1->Write();
0510 h2etacoefmin16_2->Write();
0511 
0512 }