ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/SCerci/src/ForwardJet.cc
(Generate patch)

Comparing UserCode/SCerci/src/ForwardJet.cc (file contents):
Revision 1.1 by salim, Thu Jul 19 09:16:12 2007 UTC vs.
Revision 1.2 by salim, Wed Jul 25 19:40:27 2007 UTC

# Line 59 | Line 59 | public:
59   //ForwardJet::ForwardJet( const ParameterSet& pset )
60   //{}
61  
62 < ForwardJet::ForwardJet( const ParameterSet& pset ) : fOutputFileName( pset.getUntrackedParameter<string>("HistOutFile",string("/data2/salim/ForwardJet/ForwardJet_v4_Id.root"))),fOutputFile(0)
62 > ForwardJet::ForwardJet( const ParameterSet& pset ) : fOutputFileName( pset.getUntrackedParameter<string>("HistOutFile",string("/data2/salim/ForwardJet/ForwardJet_QCD_pt_120_170.root"))),fOutputFile(0)
63                                                      
64   {
65   }
# Line 73 | Line 73 | void ForwardJet::beginJob( const EventSe
73     //RecGenTree->Branch("fRecJetPt", &fRecJetPt, "fRecJetPt[fNRecJ]/D");
74  
75      // limits for histograms
76 <    int     nbinspt = 200;
76 >    int     nbinspt = 300;
77      int     nbinsphi = 100;
78 <    int     nbinsE= 200;    
78 >    int     nbinsE= 300;    
79      int     nbinsEta =100;
80      int     nbinsBjoX=600;
81      double  ptmin = 0; //GeV
82 <    double  ptmax = 200; //GeV
82 >    double  ptmax = 300; //GeV
83      double  ymin = -10;
84      double  ymax = 10;
85      double  BjoXmin = -6;
# Line 87 | Line 87 | void ForwardJet::beginJob( const EventSe
87      double  phimin = -TMath::Pi();
88      double  phimax = TMath::Pi();
89      double  Emin=0; //GeV
90 <    double  Emax=200; //GeV
90 >    double  Emax=300; //GeV
91      double  ETCut=20; //GeV
92      double  threshold = 0.2;
93      double  sqrts = 14000.;//Gev
# Line 129 | Line 129 | void ForwardJet::beginJob( const EventSe
129      char label1 [500];//for reco jet phi distribution
130      char label2 [500];//for reco jet eta  distribution
131      
132 <    double limBins[]  = {10,20,30,40,50,60,70,80,100.0,120.,150.,200};
132 >    double limBins[]  = {10,20,30,40,50,60,70,80,100.0,120.,150.,250};
133  
134      ratioE = new TH1D ("ratioE", "E^{reco}_{T}/E^{MC}_{T}",nbreBins, Emin, Emax);
135      ratioE->Sumw2();
# Line 143 | Line 143 | void ForwardJet::beginJob( const EventSe
143      for (unsigned int indexH=0;indexH<nbreBins;indexH++)  
144        {
145       sprintf(nameHist,"ETdistribution%i",indexH);
146 <     sprintf(nameHist1,"phi {rec} distribution%i",indexH);
147 <     sprintf(nameHist2,"eta {rec} distribution%i",indexH);
146 >     sprintf(nameHist1,"phidistribution%i",indexH);
147 >     sprintf(nameHist2,"etadistribution%i",indexH);
148  
149       sprintf(label,"E_{T}(reco)/E_{T}(Gen) #in #left[%f , %f #right] GeV",limBins[indexH],limBins[indexH+1]);
150       sprintf(label1,"#phi_{rec} #in #left[%f , %f #right] GeV",limBins[indexH],limBins[indexH+1]);
# Line 155 | Line 155 | void ForwardJet::beginJob( const EventSe
155       EThist[indexH]->GetXaxis()->SetTitle("E_{T}^{reco}/E_{t}^{gen}");
156       EThist[indexH]->GetYaxis()->SetTitle("#");
157  
158 <     Phihist[indexH]=new TH1D(nameHist1,label1,nbinsE, 0., phimax );
158 >     Phihist[indexH]=new TH1D(nameHist1,label1,480, 0.2, 1.8 );
159       Phihist[indexH]->Sumw2();
160 <     Phihist[indexH]->GetXaxis()->SetTitle("#phi_{rec}");
160 >     Phihist[indexH]->GetXaxis()->SetTitle("#phi_{rec}/#phi_{gen}");
161       Phihist[indexH]->GetYaxis()->SetTitle("#");
162  
163 <     Etahist[indexH]=new TH1D(nameHist2,label2,nbinsE,2., 6.);
163 >     Etahist[indexH]=new TH1D(nameHist2,label2,400,0.8, 1.2);
164       Etahist[indexH]->Sumw2();
165 <     Etahist[indexH]->GetXaxis()->SetTitle("#eta_{rec}");
165 >     Etahist[indexH]->GetXaxis()->SetTitle("#eta_{rec}/#eta_{gen}/");
166       Etahist[indexH]->GetYaxis()->SetTitle("#");
167        }
168  
# Line 194 | Line 194 | void ForwardJet::analyze( const Event& e
194    double limBins[]  = {10,20,30,40,50,60,70,80,100.0,120.,150.,200};
195    int nbreBins=11;
196    
197 <   cout << "Event No: " << e.id() << " started to be analyzed" << endl;
197 >  //cout << "Event No: " << e.id() << " started to be analyzed" << endl;
198     //cout<<"EventNumber====>"<<e.entries()<<endl;
199  
200     cout<<"Event Number=="<<eventnum<<endl;
# Line 264 | Line 264 | void ForwardJet::analyze( const Event& e
264        for(int g = 0; g <tmpGenJet.size();++g){
265    
266          fGJ = tmpGenJet[g];
267 <        fGJ.print();
268 <        cout<<"particle Id=="<<fGJ.pdgId()<<endl;
267 >        //fGJ.print();
268 >        //cout<<"particle Id=="<<fGJ.pdgId()<<endl;
269          if(fGJ.et()>ETCut)
270            {
271              ptGen->Fill(fGJ.pt());
# Line 300 | Line 300 | void ForwardJet::analyze( const Event& e
300              
301              if(fGJ.et()>ETCut)
302                {
303 <                cout<<" Castor Eta Bjr=="<<fGJ.eta()<< "  GenEt=="<<fGJ.eta()<<endl;
303 >                //      cout<<" Castor Eta Bjr=="<<fGJ.eta()<< "  GenEt=="<<fGJ.eta()<<endl;
304                  BjoX=log10((fGJ.pt()/sqrts)*exp((-1)*(fGJ.eta())));
305                  distX_castor->Fill( BjoX,fGJ.et());
306                
# Line 359 | Line 359 | void ForwardJet::analyze( const Event& e
359     GenJet  fGJet;
360     CaloJet fRJet;
361     //int genjetused[500];
362 <   //for(int gg = 0; gg <500;++gg){genjetused[gg] = 0;}
362 >   // for(int gg = 0; gg <500;++gg){genjetused[gg] = 0;}
363  
364     if(tmpGenJet.size()>0 && tmpCaloJet.size()>0)
365       {
# Line 384 | Line 384 | void ForwardJet::analyze( const Event& e
384               {
385  
386                 //if(genjetused[gg] == 0)
387 <               //{
387 >                 //{
388              
389                     RatioE_vs_Eta->Fill(abs(GenJetEta), fRJet.et()/fGJet.et());
390                     RatioE_vs_E->Fill(fGJet.et(), fRJet.et()/fGJet.et());
# Line 398 | Line 398 | void ForwardJet::analyze( const Event& e
398                             cout<<"RjetEta=="<<fRJet.eta()<<"  GenJetEt=="<<fGJet.et()<<endl;
399  
400                             EThist[trueIndex]->Fill((fRJet.et())/(fGJet.et()));
401 <                           Phihist[trueIndex]->Fill(abs(fRJet.phi()));
402 <                           Etahist[trueIndex]->Fill(abs(fRJet.eta()));
401 >                           Phihist[trueIndex]->Fill(abs(fRJet.phi())/abs(fGJet.phi()));
402 >                           Etahist[trueIndex]->Fill(abs(fRJet.eta())/abs(fGJet.eta()));
403                             trueRecoJet->Fill(fRJet.et());
404                             countD++;
405                           }
406                         RatioE_hf_vs_Eta->Fill(abs(GenJetEta), fRJet.et()/fGJet.et());
407                         RatioE_hf_vs_E->Fill(fGJet.et(), fRJet.et()/fGJet.et());
408                  
409 <                     }
410 <                   //}
409 >                       //}
410 >                 }
411            
412            
413               }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines