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

Comparing UserCode/CmsHi/JetAnalysis/src/HiInclusiveJetAnalyzer.cc (file contents):
Revision 1.2 by yilmaz, Tue Sep 20 20:06:06 2011 UTC vs.
Revision 1.3 by yilmaz, Tue Sep 20 22:24:42 2011 UTC

# Line 178 | Line 178 | HiInclusiveJetAnalyzer::analyze(const Ev
178  
179    LogDebug("HiInclusiveJetAnalyzer")<<"START event: "<<event<<" in run "<<run<<endl;
180  
181
181   int bin = -1;
182    double hf = 0.;
183    double b = 999.;
184  
185    if(useCentrality_){
187    //if(!isMC_){
186        if(!centrality_) centrality_ = new CentralityProvider(iSetup);      
187        centrality_->newEvent(iEvent,iSetup); // make sure you do this first in every event
188        //double c = centrality_->centralityValue();
# Line 194 | Line 192 | HiInclusiveJetAnalyzer::analyze(const Ev
192  
193        bin = centrality_->getBin();
194        b = centrality_->bMean();
197      //}
198      /*
199    else{
200
201      TFile * centFile = new TFile("/net/hidsk0001/d00/scratch/mnguyen/CMSSW_3_9_1_patch1/src/macros/Hydjet_CentTable.root");
202
203      edm::Handle<reco::Centrality> cent;
204      iEvent.getByLabel(edm::InputTag("hiCentrality"),cent);
205      //cout<<" grabbed centrality "<<endl;
206      CentralityBins::RunMap cmap = getCentralityFromFile(centFile, "makeCentralityTableTFile", "HFhitsHydjet_2760GeV", 1, 1);
207
208      // Still getting cent from hits.  When tower tables become available, we need to switch
209      hf = cent->EtHFhitSum();
210      //cout<<" hf "<<hf<<endl;
211      bin = cmap[run]->getBin(hf);
212      b = cmap[run]->bMeanOfBin(bin);
213    }
214      */
195    }
196    
197  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines