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

Comparing UserCode/MPIAnalyzer/src/MPIntuple.cc (file contents):
Revision 1.21 by naodell, Wed Nov 3 09:53:54 2010 UTC vs.
Revision 1.24 by naodell, Mon Nov 29 13:09:04 2010 UTC

# Line 34 | Line 34
34   #include "DataFormats/TrackReco/interface/Track.h"
35   #include "DataFormats/BeamSpot/interface/BeamSpot.h"
36   #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
37 + #include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h"
38  
39   //#include "RecoVertex/PrimaryVertexProducer/interface/VertexHigherPtSquared.h"
40  
41   //GenParticles
42 < //#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
42 > #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
43  
44   // Need to get correctors
45   #include "JetMETCorrections/Objects/interface/JetCorrector.h"
# Line 98 | Line 99 | class MPIntuple : public edm::EDAnalyzer
99    //  Counting variables   //
100  
101    int eventNumber, runNumber, lumiSection, bunchCross;
102 <  double ptHat, qScale;
102 >  double ptHat, qScale, crossSection;
103    
104    TTree* sTree;
105    TFile* ntupleFile;
# Line 121 | Line 122 | class MPIntuple : public edm::EDAnalyzer
122    unsigned int triggerStatus;
123  
124    //Histograms
125 <  TH1F * h1_nAssociatedTracks;
126 <  TH1F * h1_trackZ;
127 <  TH1F * h1_trackDxy;
128 <  TH1F * h1_allTrackDeltaZ_PV;
129 <  TH1F * h1_allTrackDeltaZ_LJ;
125 >  TH1D * h1_fracAssociatedTracks;
126 >  TH1D * h1_meanJetTrackZ;
127 >  TH1D * h1_trackDxy;
128 >  TH1D * h1_jetVertexZ;
129 >  TH1D * h1_associatedSumPt;
130 >  TH1D * h1_associatedVertexIndex;
131    TH2F * h2_nAssTracksVsJetPt;
132    TProfile * p1_nVtcs;
133  
# Line 142 | Line 144 | MPIntuple::MPIntuple(const edm::Paramete
144    triggerHLT_ = iConfig.getUntrackedParameter<bool>("triggerHLT");
145    rootfilename = iConfig.getUntrackedParameter<string>("rootfilename");
146    hlTriggerResults_ = iConfig.getUntrackedParameter<string>("HLTriggerResults","TriggerResults");
147 <  hltName_ = iConfig.getUntrackedParameter<string>("hltName","HLT");
147 >  hltName_ = iConfig.getUntrackedParameter<string>("hltName");
148   }
149  
150   MPIntuple::~MPIntuple()
# Line 172 | Line 174 | void MPIntuple::analyze(const edm::Event
174    int pfCount   = 0;
175    int genCount  = 0;
176    int vtxCount  = 0;
177 <  float ljVertexZ = -999;
176 <  float primaryVertexZ = -999;
177 >  double primaryVertexZ = -999;
178  
179    //////////////////////////
180    //Get vertex information//
# Line 188 | Line 189 | void MPIntuple::analyze(const edm::Event
189      if(!myVtx.isValid() || myVtx.isFake()) continue;
190      TCPrimaryVtx* vtxCon = new ((*primaryVtx)[vtxCount]) TCPrimaryVtx;
191        
192 <    cout<<myVtx.nTracks()<<endl;
192 >    //cout<<myVtx.nTracks()<<endl;
193  
194      vtxCon->SetPosition(myVtx.x(), myVtx.y(), myVtx.z());
195      vtxCon->SetNDof(myVtx.ndof());
# Line 230 | Line 231 | void MPIntuple::analyze(const edm::Event
231      for(PFJetCollection::const_iterator jet_iter = PFJets->begin(); jet_iter!= PFJets->end(); ++jet_iter){
232        
233        reco::PFJet myJet = reco::PFJet(*jet_iter);
234 <      if(myJet.et() > 5){
234 >      if(myJet.pt() > 5){
235  
236          for(jet_it_1 = bTags1.begin(); jet_it_1 != bTags1.end(); jet_it_1++) {
237             if( (fabs(jet_it_1->first->eta() - myJet.eta()) < .005) && (deltaPhi(jet_it_1->first->phi(),myJet.phi()) < .005)) break;
# Line 258 | Line 259 | void MPIntuple::analyze(const edm::Event
259          if(jet_it_2 != bTags2.end()) jetCon->SetBDiscrTrkCountHiPure(jet_it_2->second);
260          if(jet_it_1 != bTags1.end()) jetCon->SetBDiscrTrkCountHiEff(jet_it_1->second);
261  
262 <        float scale2 = correctorL2->correction(myJet);
262 >        double scale2 = correctorL2->correction(myJet);
263          myJet.scaleEnergy(scale2);
264 <        float scale3 = correctorL3->correction(myJet);
264 >        double scale3 = correctorL3->correction(myJet);
265          myJet.scaleEnergy(scale3);
266  
267          //more corrections?
# Line 274 | Line 275 | void MPIntuple::analyze(const edm::Event
275  
276          const reco::TrackRefVector &tracks = myJet.getTrackRefs();
277  
278 <        float sumTrackZ, sumTrackIP;
279 <        float meanTrackZ, meanTrackIP;
280 <        int   nAssociatedTracks = -1;
281 <
282 <        sumTrackZ  = sumTrackIP  = 0;
283 <        meanTrackZ = meanTrackIP = -999;
284 <
285 <        if(myJet.pt() > 20 && fabs(myJet.eta()) < 2.4){
278 >        vector<TVector3> vtxPositionCollection;
279 >        vector<double>  associatedTrackSumPt;
280 >        vector<unsigned int> jetTrackAddresses;
281 >        double sumTrackX, sumTrackY, sumTrackZ, sumTrackIP, sumTrackPt;
282 >        //double meanTrackX, meanTrackY, meanTrackZ, meanTrackIP;
283 >        int   nJetTracks, nVertexTracks, nAssociatedTracks, vertexIndex;
284 >        int   vCount = 0;
285 >
286 >        nJetTracks = nVertexTracks = nAssociatedTracks = 0;
287 >        sumTrackX = sumTrackY = sumTrackZ  = sumTrackIP  = sumTrackPt = 0;
288 >        //meanTrackZ = meanTrackIP = -999;
289  
290 <          nAssociatedTracks = 0;
290 >        if(myJet.pt() > 10 && fabs(myJet.eta()) < 2.4){
291  
292            for(TrackRefVector::const_iterator iTrack = tracks.begin(); iTrack != tracks.end(); ++iTrack){
293  
294 <            const reco::Track    &myJetTrack = **iTrack;
291 <            //const reco::TrackRef &myTrackRef = *iTrack;
294 >            const reco::Track &myJetTrack = **iTrack;
295  
296 <            sumTrackZ += myJetTrack.vz();
296 >            sumTrackPt += myJetTrack.pt();
297 >            sumTrackX  += myJetTrack.vx();
298 >            sumTrackY  += myJetTrack.vy();            
299 >            sumTrackZ  += myJetTrack.vz();
300              sumTrackIP += myJetTrack.dxy(vertexBeamSpot.position());
301 <            ++nAssociatedTracks;
301 >            jetTrackAddresses.push_back((unsigned int)&myJetTrack);
302 >            ++nJetTracks;
303 >          }
304  
305 <            for(VertexCollection::const_iterator vtx_iter = primaryVtcs->begin(); vtx_iter!= primaryVtcs->end(); ++vtx_iter){
306 <              
307 <              reco::Vertex myVtx = reco::Vertex(*vtx_iter);
308 <              if(!myVtx.isValid() || myVtx.isFake()) continue;
305 >          if(nJetTracks > 0){
306 >
307 >            jetCon->SetVtx(sumTrackX/nJetTracks, sumTrackY/nJetTracks, sumTrackZ/nJetTracks);          
308 >
309 >            h1_meanJetTrackZ->Fill(sumTrackZ/nJetTracks);
310 >            h1_trackDxy->Fill(sumTrackIP/nJetTracks);
311 >
312 >          }
313 >          /*meanTrackX = sumTrackX/nJetTracks;
314 >          meanTrackY = sumTrackY/nJetTracks;      
315 >          meanTrackZ = sumTrackZ/nJetTracks;
316 >          */
317 >
318 >          if(jetTrackAddresses.size() > 0){
319 >
320 >            for(VertexCollection::const_iterator vtx_iter = primaryVtcs->begin(); vtx_iter!= primaryVtcs->end(); ++vtx_iter){
321                
322 <              for(Vertex::trackRef_iterator iTrackRef = myVtx.tracks_begin(); iTrackRef != myVtx.tracks_end(); ++iTrackRef){
323 <                const edm::RefToBase<reco::Track> &myTrackRef = *iTrackRef;
322 >              reco::Vertex myVtx = reco::Vertex(*vtx_iter);
323 >              if(!myVtx.isValid() || myVtx.isFake()) continue;
324  
325 <                if(myTrackRef.isAvailable()){
325 >              TVector3 *iVtxPosition = new TVector3(myVtx.x(), myVtx.y(), myVtx.z());
326 >              vtxPositionCollection.push_back(*iVtxPosition);
327 >              associatedTrackSumPt.push_back(0);            
328 >            
329 >              for(Vertex::trackRef_iterator iTrackRef = myVtx.tracks_begin(); iTrackRef != myVtx.tracks_end(); ++iTrackRef){
330 >                const edm::RefToBase<reco::Track> &myTrackRef = *iTrackRef;
331  
332 <                  const reco::Track &myVertexTrack = *myTrackRef.get();
333 <                                
334 <                  cout<<"Vertex track z = "<<myVertexTrack.vz()<<endl;
335 <                  cout<<"Jet track z = "<<myJetTrack.vz()<<endl;
336 <                
337 <                }
338 <              }      
339 <            }              
340 <          }
341 <          
342 <          meanTrackZ = sumTrackZ/nAssociatedTracks;
343 <          h1_nAssociatedTracks->Fill(nAssociatedTracks);
344 <          h2_nAssTracksVsJetPt->Fill(myJet.pt(), nAssociatedTracks);
345 <          
346 <          for(TrackRefVector::const_iterator iTrack = tracks.begin(); iTrack != tracks.end(); ++iTrack){
347 <            
348 <            const reco::Track &myJetTrack = **iTrack;
349 <            
350 <            if(nAssociatedTracks == 3) h1_trackZ->Fill(meanTrackZ - myJetTrack.vz());
351 <            h1_trackDxy->Fill(myJetTrack.dxy(vertexBeamSpot.position()));
352 <            
353 <          }    
354 <          
355 <          if(pfCount == 0){
356 <            
357 <            ljVertexZ = meanTrackZ;
358 <            
359 <          }else{
360 <            
361 <            h1_allTrackDeltaZ_LJ->Fill(ljVertexZ - meanTrackZ);
362 <            
363 <          }
364 <          
365 <          h1_allTrackDeltaZ_PV->Fill(primaryVertexZ - meanTrackZ);
366 <          
367 <        }
368 <        
369 <        jetCon->SetVtx(0, 0, meanTrackZ);      
370 <        
332 >                if(myTrackRef.isAvailable()){
333 >                  const reco::Track &myVertexTrack = *myTrackRef.get();        
334 >
335 >                  for(vector<unsigned int>::const_iterator iTrackAddress = jetTrackAddresses.begin(); iTrackAddress != jetTrackAddresses.end(); ++iTrackAddress){
336 >
337 >                    if(*iTrackAddress == (unsigned int)&myVertexTrack){
338 >
339 >                      associatedTrackSumPt.at(vCount) += myVertexTrack.pt()/sumTrackPt;
340 >                      ++nAssociatedTracks;
341 >
342 >                    }
343 >                  }
344 >                }
345 >              }
346 >              ++vCount;  
347 >            }
348 >                    
349 >            double maxSumPtFraction = 0;
350 >            vCount = vertexIndex = 0;
351 >
352 >            for(vector<double>::const_iterator iTrackSumPt = associatedTrackSumPt.begin(); iTrackSumPt != associatedTrackSumPt.end(); ++iTrackSumPt) {
353 >
354 >              if(*iTrackSumPt > maxSumPtFraction){
355 >
356 >                maxSumPtFraction = *iTrackSumPt;  
357 >                vertexIndex      = vCount + 1;
358 >
359 >              }
360 >              ++vCount;
361 >            }
362 >
363 >            if(vertexIndex > 0){
364 >
365 >              h1_jetVertexZ->Fill(vtxPositionCollection[vertexIndex-1].z());
366 >
367 >            }
368 >
369 >            jetCon->SetVtxSumPt(maxSumPtFraction);
370 >            jetCon->SetVtxIndex(vertexIndex);
371 >
372 >            h1_fracAssociatedTracks->Fill((double)nAssociatedTracks/(double)nJetTracks);
373 >            h1_associatedSumPt->Fill(maxSumPtFraction);
374 >            h1_associatedVertexIndex->Fill(vertexIndex);
375 >            h2_nAssTracksVsJetPt->Fill(myJet.pt(), nAssociatedTracks);
376 >          }
377 >        }        
378          ++pfCount;
379        }      
380      }  
# Line 350 | Line 382 | void MPIntuple::analyze(const edm::Event
382    
383    if(!isRealData){
384      
385 <    Handle<GenEventInfoProduct> GenInfoHandle;
386 <    iEvent.getByLabel("generator", GenInfoHandle);
385 >    Handle<GenEventInfoProduct> GenEventInfoHandle;
386 >    iEvent.getByLabel("generator", GenEventInfoHandle);
387 >
388 >    Handle<GenRunInfoProduct> GenRunInfoHandle;
389 >    iEvent.getByLabel("generator", GenRunInfoHandle);
390  
391      Handle<reco::GenJetCollection> GenJets;
392      iEvent.getByLabel(GenJetHandle_, GenJets);
393  
394 <    ptHat = qScale = -1;
360 <
361 <    if(GenInfoHandle.isValid()){
362 <
363 <      qScale = GenInfoHandle->qScale();
364 <      ptHat  = (GenInfoHandle->hasBinningValues() ? GenInfoHandle->binningValues()[0] : 0.0);
394 >    ptHat = qScale = -1; crossSection = 0;
395  
396 +    if(GenEventInfoHandle.isValid())
397 +    {
398 +      qScale       = GenEventInfoHandle->qScale();
399 +      ptHat        = (GenEventInfoHandle->hasBinningValues() ? GenEventInfoHandle->binningValues()[0] : 0.0);
400 +    }
401 +    if(GenRunInfoHandle.isValid())
402 +    {
403 +      crossSection = GenRunInfoHandle->crossSection();
404      }
405          
406      for(GenJetCollection::const_iterator jet_iter = GenJets->begin(); jet_iter!= GenJets->end(); ++jet_iter){
# Line 372 | Line 410 | void MPIntuple::analyze(const edm::Event
410        if(myJet.pt() > 5){
411          
412          new ((*jetP4_ak5Gen)[genCount]) TLorentzVector(myJet.px(), myJet.py(), myJet.pz(), myJet.energy());
413 <        
413 >
414 >        const reco::GenParticle *myGenParticle = myJet.getGenConstituent(0);
415 >        const reco::Candidate   *myMother      = myGenParticle->mother();
416 >        int   nGrandMas = 1;
417 >
418 >        for(int iter = 0; nGrandMas != 0; ++iter)
419 >        {
420 >          myMother  = myMother->mother();
421 >          nGrandMas = myMother->mother()->numberOfMothers();
422 >        }
423 >        //cout<<myJet.print()<<endl;
424 >        cout<<"Jet flavor: "<< myMother->pdgId()<<endl;
425          ++genCount;
426          
427        }
# Line 392 | Line 441 | void MPIntuple::analyze(const edm::Event
441      const TriggerNames & triggerNames = iEvent.triggerNames(*hltR);
442      hlNames=triggerNames.triggerNames();
443      
444 <    string MPI_TriggerNames[] = {"HLT_PixelTracks_Multiplicity70", "HLT_MinBiasBSC_NoBPTX", "HLT_PixelTracks_Multiplicity40","HLT_L1Tech_HCAL_HF", "HLT_IsoTrackHB_8E29", "HLT_IsoTrackHE_8E29", "HLT_L1Tech_RPC_TTU_RBst1_collisions", "HLT_L1_BscMinBiasOR_BptxPlusORMinus", "HLT_L1Tech_BSC_halo_forPhysicsBackground", "HLT_L1Tech_BSC_HighMultiplicity", "HLT_MinBiasPixel_DoubleIsoTrack5", "HLT_MinBiasPixel_DoubleTrack", "HLT_MinBiasPixel_SingleTrack", "HLT_ZeroBiasPixel_SingleTrack", "HLT_MinBiasBSC", "HLT_StoppedHSCP_8E29", "HLT_Jet15U_HcalNoiseFiltered", "HLT_QuadJet15U", "HLT_DiJetAve30U_8E29", "HLT_DiJetAve15U_8E29", "HLT_FwdJet20U", "HLT_Jet50U", "HLT_Jet30U", "HLT_Jet15U", "HLT_BTagMu_Jet10U", "HLT_DoubleJet15U_ForwardBackward", "HLT_BTagIP_Jet50U", "HLT_DoubleLooseIsoTau15", "HLT_SingleLooseIsoTau20", "HLT_HT100U", "HLT_MET100", "HLT_MET45"};
444 >    string MPI_TriggerNames[] = {"HLT_PixelTracks_Multiplicity70",
445 >                                 "HLT_MinBiasBSC_NoBPTX",
446 >                                 "HLT_PixelTracks_Multiplicity40",
447 >                                 "HLT_L1Tech_HCAL_HF",
448 >                                 "HLT_IsoTrackHB_8E29",
449 >                                 "HLT_IsoTrackHE_8E29",
450 >                                 "HLT_L1Tech_RPC_TTU_RBst1_collisions",
451 >                                 "HLT_L1_BscMinBiasOR_BptxPlusORMinus",
452 >                                 "HLT_L1Tech_BSC_halo_forPhysicsBackground",
453 >                                 "HLT_L1Tech_BSC_HighMultiplicity",
454 >                                 "HLT_MinBiasPixel_DoubleIsoTrack5",
455 >                                 "HLT_MinBiasPixel_DoubleTrack",
456 >                                 "HLT_MinBiasPixel_SingleTrack",
457 >                                 "HLT_ZeroBiasPixel_SingleTrack",
458 >                                 "HLT_MinBiasBSC",
459 >                                 "HLT_StoppedHSCP_8E29",
460 >                                 "HLT_Jet15U_HcalNoiseFiltered",
461 >                                 "HLT_QuadJet15U",
462 >                                 "HLT_DiJetAve30U_8E29",
463 >                                 "HLT_DiJetAve15U_8E29",
464 >                                 "HLT_FwdJet20U",
465 >                                 "HLT_Jet50U",
466 >                                 "HLT_Jet30U",
467 >                                 "HLT_Jet15U",
468 >                                 "HLT_BTagMu_Jet10U",
469 >                                 "HLT_DoubleJet15U_ForwardBackward",
470 >                                 "HLT_BTagIP_Jet50U",
471 >                                 "HLT_DoubleLooseIsoTau15",
472 >                                 "HLT_SingleLooseIsoTau20",
473 >                                 "HLT_HT100U",
474 >                                 "HLT_MET100",
475 >                                 "HLT_MET45"};
476      
477      bool triggerPassed = false;
478      triggerStatus = 0x0;
# Line 404 | Line 484 | void MPIntuple::analyze(const edm::Event
484        if(triggerPassed){
485          
486          for (uint j = 0; j != 32; ++j){
487 <          
487 >
488            if (hlNames[i] == MPI_TriggerNames[j])
489 <            {
490 <              //cout<<"trigger name: "<<hlNames[i]<<"list: "<<dec<<j+1<<endl;
491 <              triggerStatus |= 0x01 << j;
492 <              
413 <            }
489 >          {
490 >            //cout<<"HLTrigger name: "<<hlNames[i]<<" bit: "<<dec<<j+1<<endl;
491 >            triggerStatus |= 0x01 << j;      
492 >          }
493          }
494        }
495      }
# Line 419 | Line 498 | void MPIntuple::analyze(const edm::Event
498  
499  
500  
501 <  if((pfCount > 3 || genCount > 3) && vtxCount > 0) sTree -> Fill();
501 >  if((pfCount > 1 || genCount > 1) && vtxCount > 0) sTree -> Fill();
502  
503    jet_ak5PF->Clear();
504    primaryVtx->Clear();
# Line 432 | Line 511 | void MPIntuple::analyze(const edm::Event
511   void  MPIntuple::beginJob()
512   {
513    
514 <  ntupleFile           = new TFile(rootfilename.c_str(), "RECREATE");
515 <  sTree                = new TTree("mpiTree", "Tree for Jets");
514 >  ntupleFile               = new TFile(rootfilename.c_str(), "RECREATE");
515 >  sTree                    = new TTree("mpiTree", "Tree for Jets");
516  
517 <  h1_trackZ            = new TH1F("h1_trackZ", "#Delta z for associated tracks", 60, -0.3, 0.3);
518 <  h1_nAssociatedTracks = new TH1F("h1_nAssociatedTracks", "Number of tracks associated to jet", 20, -0.5, 19.5);
519 <  h1_trackDxy          = new TH1F("h1_trackDxy", "dxy for all associated tracks", 50, -0.4, 0.4);
520 <  h1_allTrackDeltaZ_PV = new TH1F("h1_allTrackDeltaZ_PV", "#Delta z between jet and primary vertex", 60, -0.3, 0.3);
521 <  h1_allTrackDeltaZ_LJ = new TH1F("h1_allTrackDeltaZ_LJ", "#Delta z between leading jet and other jet vertices", 60, -0.3, 0.3);
522 <  h2_nAssTracksVsJetPt = new TH2F("h2_nAssTracksVsJetPt", "nTracks vs Jet p_{T}", 50, 0, 100, 20, -0.5, 19.5);
523 <  p1_nVtcs             = new TProfile("p1_nVtcs", "<N> per run", 5200.0, 132300.0, 137500.0, 0.0, 6.0);
524 <
525 <  jet_ak5PF            = new TClonesArray("TCJet");
526 <  jetP4_ak5Gen         = new TClonesArray("TLorentzVector");
527 <  primaryVtx           = new TClonesArray("TCPrimaryVtx");
517 >  h1_fracAssociatedTracks  = new TH1D("h1_fracAssociatedTracks", "Fraction of associated jet tracks", 20, 0.0, 1.0);
518 >  h1_trackDxy              = new TH1D("h1_trackDxy", "dxy for all associated tracks", 50, -0.4, 0.4);
519 >  h1_meanJetTrackZ         = new TH1D("h1_meanJetTrackZ", "<z> from jet tracks", 50, -25.0, 25.0);
520 >  h1_jetVertexZ            = new TH1D("h1_jetVertexZ", "z for vertex associated to jet", 50, -25.0, 25.0);
521 >  h1_associatedSumPt       = new TH1D("h1_associatedSumPt", "ratio of sum p_{T} between associatedTracks and jetTracks", 20, 0.0, 1.0);
522 >  h1_associatedVertexIndex = new TH1D("h1_associatedVertex", "number of jets associated to primary vertex", 5, -0.5, 4.5);
523 >  h2_nAssTracksVsJetPt     = new TH2F("h2_nAssTracksVsJetPt", "nTracks vs Jet p_{T}", 50, 0, 100, 20, -0.5, 19.5);
524 >  p1_nVtcs                 = new TProfile("p1_nVtcs", "<N> per run", 5200.0, 132300.0, 137500.0, 0.0, 6.0);
525 >
526 >  jet_ak5PF                = new TClonesArray("TCJet");
527 >  jetP4_ak5Gen             = new TClonesArray("TLorentzVector");
528 >  primaryVtx               = new TClonesArray("TCPrimaryVtx");
529  
530  
531    sTree->Branch("jet_ak5PF",&jet_ak5PF, 6400, 0);
# Line 459 | Line 539 | void  MPIntuple::beginJob()
539    sTree->Branch("isRealData",&isRealData, "isRealData/i");
540    sTree->Branch("bunchCross",&bunchCross, "bunchCross/i");
541    sTree->Branch("ptHat",&ptHat, "ptHat/d");
542 <
542 >  sTree->Branch("qScale", &qScale, "qScale/d");
543 >  sTree->Branch("crossSection", &crossSection, "crossSection/d");
544   }
545  
546   // ------------ method called once each job just after ending the event loop  ------------
# Line 468 | Line 549 | void MPIntuple::endJob()
549  
550    ntupleFile->cd();
551  
552 <  h1_trackZ->Write();
553 <  h1_nAssociatedTracks->Write();
552 >  h1_fracAssociatedTracks->Write();
553 >  h1_meanJetTrackZ->Write();
554    h1_trackDxy->Write();
555 <  h1_allTrackDeltaZ_PV->Write();
556 <  h1_allTrackDeltaZ_LJ->Write();
555 >  h1_jetVertexZ->Write();
556 >  h1_associatedSumPt->Write();
557 >  h1_associatedVertexIndex->Write();
558    h2_nAssTracksVsJetPt->Write();
559    p1_nVtcs->Write();
560  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines