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 TH1F  *h1etacoefmin30a = new TH1F("h1etacoefmin30a", "h1etacoefmin30a", 100, 0., 2.);
0009 TH1F  *h1etacoefmin31a = new TH1F("h1etacoefmin31a", "h1etacoefmin31a", 100, 0.6, 1.4);
0010 TH1F  *h1etacoefmin32a = new TH1F("h1etacoefmin32a", "h1etacoefmin32a", 100, 0.6, 1.4);
0011 TH1F  *h1etacoefmin30 = new TH1F("h1etacoefmin30", "h1etacoefmin30", 100, 0., 2.);
0012 TH1F  *h1etacoefmin31 = new TH1F("h1etacoefmin31", "h1etacoefmin31", 100, 0.6, 1.4);
0013 TH1F  *h1etacoefmin32 = new TH1F("h1etacoefmin32", "h1etacoefmin32", 100, 0.6, 1.4);
0014 
0015 TH1F  *h1etacoefmin33 = new TH1F("h1etacoefmin33", "h1etacoefmin33", 100, 0.6, 1.4);
0016 TH1F  *h1etacoefmin34 = new TH1F("h1etacoefmin34", "h1etacoefmin34", 100, 0.6, 1.4);
0017 TH1F  *h1etacoefmin35 = new TH1F("h1etacoefmin35", "h1etacoefmin35", 100, 0.6, 1.4);
0018 TH1F  *h1etacoefmin36 = new TH1F("h1etacoefmin36", "h1etacoefmin36", 100, 0.6, 1.4);
0019 TH1F  *h1etacoefmin37 = new TH1F("h1etacoefmin37", "h1etacoefmin37", 100, 0.6, 1.4);
0020 TH1F  *h1etacoefmin38 = new TH1F("h1etacoefmin38", "h1etacoefmin38", 100, 0.6, 1.4);
0021 TH1F  *h1etacoefmin39 = new TH1F("h1etacoefmin39", "h1etacoefmin39", 100, 0.7, 1.3);
0022 TH1F  *h1etacoefmin40 = new TH1F("h1etacoefmin40", "h1etacoefmin40", 100, 0.7, 1.3);
0023 TH1F  *h1etacoefmin41 = new TH1F("h1etacoefmin41", "h1etacoefmin41", 100, 0.7, 1.3);
0024 // Two-dim
0025 
0026 TH2F  *h2etacoefmin30 = new TH2F("h2etacoefmin30", "h2etacoefmin30",72, 0.5, 72.5, 100, 0.6, 1.4);
0027 TH2F  *h2etacoefmin31 = new TH2F("h2etacoefmin31", "h2etacoefmin31",72, 0.5, 72.5, 100, 0.6, 1.4);
0028 TH2F  *h2etacoefmin32 = new TH2F("h2etacoefmin32", "h2etacoefmin32",72, 0.5, 72.5, 100, 0.6, 1.4);
0029 TH2F  *h2etacoefmin33 = new TH2F("h2etacoefmin33", "h2etacoefmin33",72, 0.5, 72.5, 100, 0.6, 1.4);
0030 TH2F  *h2etacoefmin34 = new TH2F("h2etacoefmin34", "h2etacoefmin34",72, 0.5, 72.5, 100, 0.6, 1.4);
0031 TH2F  *h2etacoefmin35 = new TH2F("h2etacoefmin35", "h2etacoefmin35",72, 0.5, 72.5, 100, 0.6, 1.4);
0032 TH2F  *h2etacoefmin36 = new TH2F("h2etacoefmin36", "h2etacoefmin36",72, 0.5, 72.5,100, 0.6, 1.4);
0033 TH2F  *h2etacoefmin37 = new TH2F("h2etacoefmin37", "h2etacoefmin37",72, 0.5, 72.5, 100, 0.6, 1.4);
0034 TH2F  *h2etacoefmin38 = new TH2F("h2etacoefmin38", "h2etacoefmin38",72, 0.5, 72.5, 100, 0.7, 1.3);
0035 TH2F  *h2etacoefmin39 = new TH2F("h2etacoefmin39", "h2etacoefmin39",72, 0.5, 72.5, 100, 0.7, 1.3);
0036 TH2F  *h2etacoefmin40 = new TH2F("h2etacoefmin40", "h2etacoefmin40",72, 0.5, 72.5, 100, 0.7, 1.3);
0037 TH2F  *h2etacoefmin41 = new TH2F("h2etacoefmin41", "h2etacoefmin41",72, 0.5, 72.5, 100, 0.7, 1.3);
0038 
0039 
0040 cout<<" Book histos "<<endl;
0041 
0042 std::string line;
0043 std::ifstream in20( "coefficients_8.9mln.txt" );
0044 
0045 Int_t i11 = 0;
0046 
0047 Int_t maxc[36] = {1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71};
0048 Int_t maxc1[18] = {1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69};
0049 
0050 while( std::getline( in20, line)){
0051 int subd,eta,phi,dep;
0052 Float_t var,err;
0053 istringstream linestream(line);
0054 linestream>>subd>>dep>>eta>>phi>>var>>err;
0055   if( subd == 4 && eta > 0 ) {
0056 
0057     if(dep == 1 && eta == 30) cout<<var<<endl;
0058     if(dep == 1 && eta == 30) {h2etacoefmin30->Fill(phi,var);}
0059     if(dep == 1 && eta == 31) {h2etacoefmin31->Fill(phi,var);}
0060     if(dep == 1 && eta == 32) {h2etacoefmin32->Fill(phi,var);} 
0061     if(dep == 1 && eta == 33) {h2etacoefmin33->Fill(phi,var);}
0062     if(dep == 1 && eta == 34) {h2etacoefmin34->Fill(phi,var);}
0063     if(dep == 1 && eta == 35) {h2etacoefmin35->Fill(phi,var);}
0064     if(dep == 1 && eta == 36) {h2etacoefmin36->Fill(phi,var);} 
0065     if(dep == 1 && eta == 37) {h2etacoefmin37->Fill(phi,var);} 
0066     if(dep == 1 && eta == 38) {h2etacoefmin38->Fill(phi,var);}       
0067     if(dep == 1 && eta == 39) {h2etacoefmin39->Fill(phi,var);}
0068     if(dep == 1 && eta == 40) {h2etacoefmin40->Fill(phi,var);} 
0069     if(dep == 1 && eta == 41) {h2etacoefmin41->Fill(phi,var);} 
0070     
0071 /*
0072     if( phi == 70 || var < 0.95 ) continue;
0073 */    
0074     
0075     if(dep == 1 && eta == 30) {h1etacoefmin30->Fill(var);if(var<1.02) h1etacoefmin30a->Fill(var);}
0076     if(dep == 1 && eta == 31) {h1etacoefmin31->Fill(var);if(var<1.02) h1etacoefmin31a->Fill(var);}
0077     if(dep == 1 && eta == 32) {h1etacoefmin32->Fill(var);if(var<1.02) h1etacoefmin32a->Fill(var);}
0078     if(dep == 1 && eta == 33) {h1etacoefmin33->Fill(var);} 
0079     if(dep == 1 && eta == 34) {h1etacoefmin34->Fill(var);} 
0080     if(dep == 1 && eta == 35) {h1etacoefmin35->Fill(var);}       
0081     if(dep == 1 && eta == 36) {h1etacoefmin36->Fill(var);}
0082     if(dep == 1 && eta == 37) {h1etacoefmin37->Fill(var);} 
0083     if(dep == 1 && eta == 38) {h1etacoefmin38->Fill(var);} 
0084     if(dep == 1 && eta == 39) {h1etacoefmin39->Fill(var);}
0085     if(dep == 1 && eta == 40) {h1etacoefmin40->Fill(var);}
0086     if(dep == 1 && eta == 41) {h1etacoefmin41->Fill(var);}
0087 
0088 
0089   } // subd = 2
0090 }
0091 
0092 
0093 TFile efile("coefficients_219_val_hf_plus_8.9mln.root","recreate");
0094 
0095 h1etacoefmin30->Write();h1etacoefmin30a->Write();
0096 h1etacoefmin31->Write();h1etacoefmin31a->Write();
0097 h1etacoefmin32->Write();h1etacoefmin32a->Write();
0098 h1etacoefmin33->Write();
0099 h1etacoefmin34->Write();
0100 h1etacoefmin35->Write();
0101 h1etacoefmin36->Write();
0102 h1etacoefmin37->Write();
0103 h1etacoefmin38->Write();
0104 h1etacoefmin39->Write();
0105 h1etacoefmin40->Write();
0106 h1etacoefmin41->Write();
0107 
0108 h2etacoefmin30->Write();
0109 h2etacoefmin31->Write();
0110 h2etacoefmin32->Write();
0111 h2etacoefmin33->Write();
0112 h2etacoefmin34->Write();
0113 h2etacoefmin35->Write();
0114 h2etacoefmin36->Write();
0115 h2etacoefmin37->Write();
0116 h2etacoefmin38->Write();
0117 h2etacoefmin39->Write();
0118 h2etacoefmin40->Write();
0119 h2etacoefmin41->Write();
0120 
0121 }