CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Calibration/IsolatedParticles/plugins/IsolatedGenParticles.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    IsolatedGenParticles
00004 // Class:      IsolatedGenParticles
00005 // 
00013 //
00014 // Original Author:  Seema Sharma
00015 //         Created:  Tue Oct 27 09:46:41 CDT 2009
00016 //
00017 //
00018 
00019 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
00020 #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h"
00021 
00022 #include "Geometry/CaloEventSetup/interface/CaloTopologyRecord.h"
00023 #include "Geometry/CaloTopology/interface/CaloSubdetectorTopology.h"
00024 #include "Geometry/CaloTopology/interface/HcalTopology.h"
00025 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00026 #include "RecoCaloTools/Navigation/interface/CaloNavigator.h"
00027 
00028 #include "MagneticField/Engine/interface/MagneticField.h"
00029 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00030 
00031 #include "FWCore/Framework/interface/EventSetup.h"
00032 #include "FWCore/Framework/interface/ESHandle.h"
00033 #include <iostream>
00034 #include <iomanip>
00035 #include<list>
00036 #include<vector>
00037 #include<cmath>
00038 
00039 #include "Calibration/IsolatedParticles/interface/CaloPropagateTrack.h"
00040 #include "Calibration/IsolatedParticles/interface/ChargeIsolation.h"
00041 
00042 #include "Calibration/IsolatedParticles/plugins/IsolatedGenParticles.h"
00043 
00044 IsolatedGenParticles::IsolatedGenParticles(const edm::ParameterSet& iConfig) {
00045 
00046   genSrc_    = iConfig.getUntrackedParameter("GenSrc",std::string("generator"));
00047   useHepMC   = iConfig.getUntrackedParameter<bool>("UseHepMC", false );
00048   pSeed      = iConfig.getUntrackedParameter<double>("ChargedHadronSeedP", 1.0);
00049   ptMin      = iConfig.getUntrackedParameter<double>("PTMin", 1.0);
00050   etaMax     = iConfig.getUntrackedParameter<double>("MaxChargedHadronEta", 2.5);
00051   a_coneR    = iConfig.getUntrackedParameter<double>("ConeRadius",34.98);
00052   a_charIsoR = a_coneR + 28.9;
00053   a_neutIsoR = a_charIsoR*0.726;
00054   a_mipR     = iConfig.getUntrackedParameter<double>("ConeRadiusMIP",14.0);
00055   debug      = iConfig.getUntrackedParameter<bool>("Debug", false );
00056 
00057   debugL1Info_           = iConfig.getUntrackedParameter<bool>( "DebugL1Info", false );
00058   L1extraTauJetSource_   = iConfig.getParameter<edm::InputTag>("L1extraTauJetSource");
00059   L1extraCenJetSource_   = iConfig.getParameter<edm::InputTag>("L1extraCenJetSource");
00060   L1extraFwdJetSource_   = iConfig.getParameter<edm::InputTag>("L1extraFwdJetSource");
00061   L1extraMuonSource_     = iConfig.getParameter<edm::InputTag>("L1extraMuonSource");
00062   L1extraIsoEmSource_    = iConfig.getParameter<edm::InputTag>("L1extraIsoEmSource");
00063   L1extraNonIsoEmSource_ = iConfig.getParameter<edm::InputTag>("L1extraNonIsoEmSource");
00064   L1GTReadoutRcdSource_  = iConfig.getParameter<edm::InputTag>("L1GTReadoutRcdSource");
00065   L1GTObjectMapRcdSource_= iConfig.getParameter<edm::InputTag>("L1GTObjectMapRcdSource");
00066 
00067   if (!strcmp("Dummy", genSrc_.c_str())) {
00068     if (useHepMC) genSrc_ = "generator";
00069     else          genSrc_ = "genParticles";
00070   }
00071   std::cout << "Generator Source " << genSrc_ << " Use HepMC " << useHepMC
00072             << " pSeed " << pSeed << " ptMin " << ptMin << " etaMax " << etaMax
00073             << "\n a_coneR " << a_coneR << " a_charIsoR " << a_charIsoR
00074             << " a_neutIsoR " << a_neutIsoR << " a_mipR " << a_mipR 
00075             << " debug " << debug << " debugL1Info " <<   debugL1Info_ << "\n"
00076             << " L1extraTauJetSource_   " << L1extraTauJetSource_ 
00077             << " L1extraCenJetSource_   " << L1extraCenJetSource_ 
00078             << " L1extraFwdJetSource_   " << L1extraFwdJetSource_   
00079             << " L1extraMuonSource_     " << L1extraMuonSource_   
00080             << " L1extraIsoEmSource_    " << L1extraIsoEmSource_    
00081             << " L1extraNonIsoEmSource_ " << L1extraNonIsoEmSource_
00082             << " L1GTReadoutRcdSource_  " << L1GTReadoutRcdSource_  
00083             << " L1GTObjectMapRcdSource_" << L1GTObjectMapRcdSource_ 
00084             << std::endl;
00085 }
00086 
00087 IsolatedGenParticles::~IsolatedGenParticles() {
00088 
00089 }
00090 
00091 void IsolatedGenParticles::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){
00092 
00093   clearTreeVectors();
00094 
00095   nEventProc++;
00096 
00097   edm::ESHandle<MagneticField> bFieldH;
00098   iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
00099   bField = bFieldH.product();
00100 
00101   // get particle data table
00102   edm::ESHandle<ParticleDataTable> pdt;
00103   iSetup.getData(pdt);
00104 
00105   // get handle to HEPMCProduct
00106   edm::Handle<edm::HepMCProduct> hepmc;
00107   edm::Handle<reco::GenParticleCollection> genParticles;
00108   if (useHepMC) iEvent.getByLabel(genSrc_, hepmc);
00109   else          iEvent.getByLabel(genSrc_, genParticles);
00110 
00111   edm::ESHandle<CaloGeometry> pG;
00112   iSetup.get<CaloGeometryRecord>().get(pG);
00113   const CaloGeometry* geo = pG.product();
00114 
00115   edm::ESHandle<CaloTopology> theCaloTopology;
00116   iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
00117   const CaloTopology *caloTopology = theCaloTopology.product();
00118   
00119   edm::ESHandle<HcalTopology> htopo;
00120   iSetup.get<IdealGeometryRecord>().get(htopo);
00121   const HcalTopology* theHBHETopology = htopo.product();
00122 
00123   //===================== save L1 Trigger information =======================
00124   // get L1TriggerReadout records
00125   edm::Handle<L1GlobalTriggerReadoutRecord>   gtRecord;
00126   iEvent.getByLabel(L1GTReadoutRcdSource_,   gtRecord);
00127   
00128   edm::Handle<L1GlobalTriggerObjectMapRecord> gtOMRec;
00129   iEvent.getByLabel(L1GTObjectMapRcdSource_, gtOMRec);
00130   
00131   // sanity check on L1 Trigger Records
00132   if (!gtRecord.isValid()) {
00133     std::cout << "\nL1GlobalTriggerReadoutRecord with \n \nnot found"
00134       "\n  --> returning false by default!\n" << std::endl;
00135   }
00136   if (!gtOMRec.isValid()) {
00137     std::cout << "\nL1GlobalTriggerObjectMapRecord with \n \nnot found"
00138       "\n  --> returning false by default!\n" << std::endl;
00139   }
00140 
00141   // L1 decision word
00142   const DecisionWord dWord = gtRecord->decisionWord();  
00143   unsigned int numberTriggerBits= dWord.size();
00144 
00145   // just print the L1Bit number and AlgoName in first event
00146   if ( !initL1){
00147     initL1=true;
00148     std::cout << "\n  Number of Trigger bits " << numberTriggerBits << "\n\n";
00149     std::cout << "\tBit \t L1 Algorithm " << std::endl;
00150 
00151     // get ObjectMaps from ObjectMapRecord
00152     const std::vector<L1GlobalTriggerObjectMap>& objMapVec =  gtOMRec->gtObjectMap();
00153     for (std::vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
00154          itMap != objMapVec.end(); ++itMap) {
00155 
00156       // Get trigger bits
00157       int itrig = (*itMap).algoBitNumber();
00158 
00159       // Get trigger names
00160       algoBitToName[itrig] = (*itMap).algoName();
00161 
00162       std::cout  << "\t" << itrig << "\t" << algoBitToName[itrig] << std::endl;      
00163 
00164       // store the algoNames as bin labels of a histogram
00165       h_L1AlgoNames->GetXaxis()->SetBinLabel(itrig+1, algoBitToName[itrig].c_str());
00166 
00167     } // end of for loop    
00168   } // end of initL1
00169 
00170   // save L1 decision for each event 
00171   for (unsigned int iBit = 0; iBit < numberTriggerBits; ++iBit) {  
00172     bool accept = dWord[iBit];
00173     t_L1Decision->push_back(accept);
00174     // fill the trigger map
00175     if(debugL1Info_) std::cout << "Bit " << iBit << " " << algoBitToName[iBit] << " " << accept << std::endl;
00176 
00177     if(accept) h_L1AlgoNames->Fill(iBit);
00178   }
00179 
00180   //===================
00181   // L1Taus 
00182   edm::Handle<l1extra::L1JetParticleCollection> l1TauHandle;
00183   iEvent.getByLabel(L1extraTauJetSource_,l1TauHandle);
00184   l1extra::L1JetParticleCollection::const_iterator itr;
00185   for(itr = l1TauHandle->begin(); itr != l1TauHandle->end(); ++itr ) {
00186     t_L1TauJetPt      ->push_back( itr->pt() );
00187     t_L1TauJetEta     ->push_back( itr->eta() );
00188     t_L1TauJetPhi     ->push_back( itr->phi() );
00189     if(debugL1Info_) {
00190       std::cout << "tauJ p/pt  " << itr->momentum() << " " << itr->pt() 
00191                 << "  eta/phi " << itr->eta() << " " << itr->phi()
00192                 << std::endl;
00193     }
00194   }
00195 
00196   // L1 Central Jets
00197   edm::Handle<l1extra::L1JetParticleCollection> l1CenJetHandle;
00198   iEvent.getByLabel(L1extraCenJetSource_,l1CenJetHandle);
00199   for( itr = l1CenJetHandle->begin();  itr != l1CenJetHandle->end(); ++itr ) {
00200     t_L1CenJetPt    ->push_back( itr->pt() );
00201     t_L1CenJetEta   ->push_back( itr->eta() );
00202     t_L1CenJetPhi   ->push_back( itr->phi() );
00203     if(debugL1Info_) {
00204       std::cout << "cenJ p/pt     " << itr->momentum() << " " << itr->pt() 
00205                 << "  eta/phi " << itr->eta() << " " << itr->phi()
00206                 << std::endl;
00207     }
00208   }
00209   // L1 Forward Jets
00210   edm::Handle<l1extra::L1JetParticleCollection> l1FwdJetHandle;
00211   iEvent.getByLabel(L1extraFwdJetSource_,l1FwdJetHandle);
00212   for( itr = l1FwdJetHandle->begin();  itr != l1FwdJetHandle->end(); ++itr ) {
00213     t_L1FwdJetPt    ->push_back( itr->pt() );
00214     t_L1FwdJetEta   ->push_back( itr->eta() );
00215     t_L1FwdJetPhi   ->push_back( itr->phi() );
00216     if(debugL1Info_) {
00217       std::cout << "fwdJ p/pt     " << itr->momentum() << " " << itr->pt() 
00218                 << "  eta/phi " << itr->eta() << " " << itr->phi()
00219                 << std::endl;
00220     }
00221   }
00222   // L1 Isolated EM onjects
00223   l1extra::L1EmParticleCollection::const_iterator itrEm;
00224   edm::Handle<l1extra::L1EmParticleCollection> l1IsoEmHandle ;
00225   iEvent.getByLabel(L1extraIsoEmSource_, l1IsoEmHandle);
00226   for( itrEm = l1IsoEmHandle->begin();  itrEm != l1IsoEmHandle->end(); ++itrEm ) {
00227     t_L1IsoEMPt     ->push_back(  itrEm->pt() );
00228     t_L1IsoEMEta    ->push_back(  itrEm->eta() );
00229     t_L1IsoEMPhi    ->push_back(  itrEm->phi() );
00230     if(debugL1Info_) {
00231       std::cout << "isoEm p/pt    " << itrEm->momentum() << " " << itrEm->pt() 
00232                 << "  eta/phi " << itrEm->eta() << " " << itrEm->phi()
00233                 << std::endl;
00234     }
00235   }
00236   // L1 Non-Isolated EM onjects
00237   edm::Handle<l1extra::L1EmParticleCollection> l1NonIsoEmHandle ;
00238   iEvent.getByLabel(L1extraNonIsoEmSource_, l1NonIsoEmHandle);
00239   for( itrEm = l1NonIsoEmHandle->begin();  itrEm != l1NonIsoEmHandle->end(); ++itrEm ) {
00240     t_L1NonIsoEMPt  ->push_back( itrEm->pt() );
00241     t_L1NonIsoEMEta ->push_back( itrEm->eta() );
00242     t_L1NonIsoEMPhi ->push_back( itrEm->phi() );
00243     if(debugL1Info_) {
00244       std::cout << "nonIsoEm p/pt " << itrEm->momentum() << " " << itrEm->pt() 
00245                 << "  eta/phi " << itrEm->eta() << " " << itrEm->phi()
00246                 << std::endl;
00247     }
00248   }
00249   
00250   // L1 Muons
00251   l1extra::L1MuonParticleCollection::const_iterator itrMu;
00252   edm::Handle<l1extra::L1MuonParticleCollection> l1MuHandle ;
00253   iEvent.getByLabel(L1extraMuonSource_, l1MuHandle);
00254   for( itrMu = l1MuHandle->begin();  itrMu != l1MuHandle->end(); ++itrMu ) {
00255     t_L1MuonPt      ->push_back( itrMu->pt() );
00256     t_L1MuonEta     ->push_back( itrMu->eta() );
00257     t_L1MuonPhi     ->push_back( itrMu->phi() );
00258     if(debugL1Info_) {
00259       std::cout << "l1muon p/pt   " << itrMu->momentum() << " " << itrMu->pt() 
00260                 << "  eta/phi " << itrMu->eta() << " " << itrMu->phi()
00261                 << std::endl;
00262     }
00263   }
00264   //=====================================================================
00265   
00266   GlobalPoint  posVec, posECAL;
00267   math::XYZTLorentzVector momVec;
00268   if (debug) std::cout << "event number " << iEvent.id().event() <<std::endl;
00269 
00270   if (useHepMC) {
00271     const HepMC::GenEvent *myGenEvent = hepmc->GetEvent();
00272     std::vector<spr::propagatedGenTrackID> trackIDs =       spr::propagateCALO(myGenEvent, pdt, geo, bField, etaMax, false);
00273     
00274     for (unsigned int indx=0; indx<trackIDs.size(); ++indx) {
00275         int charge = trackIDs[indx].charge;
00276         HepMC::GenEvent::particle_const_iterator p = trackIDs[indx].trkItr;
00277         momVec = math::XYZTLorentzVector((*p)->momentum().px(), (*p)->momentum().py(), (*p)->momentum().pz(), (*p)->momentum().e());
00278         if (debug) std::cout << "trkIndx " << indx << " pdgid " << trackIDs[indx].pdgId << " charge " << charge <<      " momVec " << momVec << std::endl; 
00279         // only stable particles avoiding electrons and muons
00280         if (trackIDs[indx].ok && (std::abs(trackIDs[indx].pdgId)<11 ||
00281                                   std::abs(trackIDs[indx].pdgId)>=21)) {
00282           // consider particles within a phased space     
00283           if (momVec.Pt() > ptMin && std::abs(momVec.eta()) < etaMax) { 
00284           posVec  = GlobalPoint(0.1*(*p)->production_vertex()->position().x(), 
00285                                 0.1*(*p)->production_vertex()->position().y(), 
00286                                 0.1*(*p)->production_vertex()->position().z());
00287           posECAL = trackIDs[indx].pointECAL;
00288           fillTrack (posVec, momVec, posECAL, trackIDs[indx].pdgId, trackIDs[indx].okECAL, true);
00289           if (debug) std::cout << "posECAL " << posECAL << " okECAL " << trackIDs[indx].okECAL << "okHCAL " << trackIDs[indx].okHCAL << std::endl;
00290           if (trackIDs[indx].okECAL) {
00291             if ( std::abs(charge)>0 ) {
00292               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 0, 0, isoinfo1x1,   false);
00293               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 1, 1, isoinfo3x3,   false);
00294               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 3, 3, isoinfo7x7,   false);
00295               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 4, 4, isoinfo9x9,   false);
00296               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 5, 5, isoinfo11x11, false);
00297               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 7, 7, isoinfo15x15, false);
00298               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,10,10, isoinfo21x21, false);
00299               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,12,12, isoinfo25x25, false);
00300               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,15,15, isoinfo31x31, false);
00301               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_mipR, trackIDs[indx].directionECAL, isoinfoR, false);
00302               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_neutIsoR, trackIDs[indx].directionECAL, isoinfoIsoR, false);
00303               if (trackIDs[indx].okHCAL) {
00304                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 0, 0, isoinfoHC1x1, false);
00305                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 1, 1, isoinfoHC3x3, false);
00306                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 2, 2, isoinfoHC5x5, false);
00307                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 3, 3, isoinfoHC7x7, false);
00308                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_coneR, trackIDs[indx].directionHCAL, isoinfoHCR, false);
00309                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_charIsoR, trackIDs[indx].directionHCAL, isoinfoIsoHCR, false);
00310               }
00311 
00312               if (isoinfo7x7.maxNearP < 1.0) 
00313                 fillIsolatedTrack(momVec, posECAL, trackIDs[indx].pdgId);
00314             }
00315           }
00316         } else { // stabale particles within |eta|=2.5
00317           fillTrack (posVec, momVec, posECAL, 0, false, false);
00318         } 
00319       }
00320     } // loop over gen particles
00321   } else { 
00322     std::vector<spr::propagatedGenParticleID> trackIDs =       spr::propagateCALO(genParticles, pdt, geo, bField, etaMax, false);
00323 
00324     for (unsigned int indx=0; indx<trackIDs.size(); ++indx) {
00325       int charge = trackIDs[indx].charge;
00326       reco::GenParticleCollection::const_iterator p = trackIDs[indx].trkItr;
00327       
00328       momVec = math::XYZTLorentzVector(p->momentum().x(), p->momentum().y(), p->momentum().z(), p->energy());
00329       if (debug) std::cout << "trkIndx " << indx << " pdgid " << trackIDs[indx].pdgId << " charge " << charge <<        " momVec " << momVec << std::endl; 
00330       // only stable particles avoiding electrons and muons
00331       if (trackIDs[indx].ok && (std::abs(trackIDs[indx].pdgId)<11 ||
00332                                 std::abs(trackIDs[indx].pdgId)>=21)) {  
00333         // consider particles within a phased space
00334         if (momVec.Pt() > ptMin && std::abs(momVec.eta()) < etaMax) { 
00335           posVec  = GlobalPoint(p->vertex().x(), p->vertex().y(), p->vertex().z());
00336           posECAL = trackIDs[indx].pointECAL;
00337           if (debug) std::cout << "posECAL " << posECAL << " okECAL " << trackIDs[indx].okECAL << "okHCAL " << trackIDs[indx].okHCAL << std::endl;
00338           fillTrack (posVec, momVec, posECAL, trackIDs[indx].pdgId, trackIDs[indx].okECAL, true);
00339           
00340           if (trackIDs[indx].okECAL) {
00341             if ( std::abs(charge)>0 ) {
00342               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 0, 0, isoinfo1x1,   false);
00343               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 1, 1, isoinfo3x3,   false);
00344               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 3, 3, isoinfo7x7,   false);
00345               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 4, 4, isoinfo9x9,   false);
00346               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 5, 5, isoinfo11x11, false);
00347               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, 7, 7, isoinfo15x15, false);
00348               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,10,10, isoinfo21x21, false);
00349               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,12,12, isoinfo25x25, false);
00350               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology,15,15, isoinfo31x31, false);
00351               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_mipR, trackIDs[indx].directionECAL, isoinfoR, false);
00352               spr::eGenSimInfo(trackIDs[indx].detIdECAL, p, trackIDs, geo, caloTopology, a_neutIsoR, trackIDs[indx].directionECAL, isoinfoIsoR, false);
00353               if (trackIDs[indx].okHCAL) {
00354                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 0, 0, isoinfoHC1x1, false);
00355                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 1, 1, isoinfoHC3x3, false);
00356                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 2, 2, isoinfoHC5x5, false);
00357                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, theHBHETopology, 3, 3, isoinfoHC7x7, false);
00358                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_coneR, trackIDs[indx].directionHCAL, isoinfoHCR, false);
00359                 spr::hGenSimInfo(trackIDs[indx].detIdHCAL, p, trackIDs, geo, theHBHETopology, a_charIsoR, trackIDs[indx].directionHCAL, isoinfoIsoHCR, false);
00360               }
00361 
00362               if (isoinfo7x7.maxNearP < 1.0) 
00363                 fillIsolatedTrack(momVec, posECAL, trackIDs[indx].pdgId);
00364             }
00365           }
00366         } else { // stabale particles within |eta|=2.5
00367           fillTrack (posVec, momVec, posECAL, 0, false, false);
00368         } 
00369       }
00370     } // loop over gen particles
00371   } 
00372 
00373   //t_nEvtProc->push_back(nEventProc);
00374   h_NEventProc->SetBinContent(1,nEventProc);
00375   tree->Fill();
00376   
00377 } 
00378 
00379 void IsolatedGenParticles::beginJob() {
00380   
00381   nEventProc=0;
00382   
00383   initL1 = false;
00384 
00385   double tempgen_TH[NPBins+1] = { 0.0,  5.0,  12.0, 300.0}; 
00386   for(int i=0; i<=NPBins; i++)  genPartPBins[i]  = tempgen_TH[i];
00387   
00388   double tempgen_Eta[NEtaBins+1] = {0.0, 0.5, 1.1, 1.7, 2.3};
00389   for(int i=0; i<=NEtaBins; i++) genPartEtaBins[i] = tempgen_Eta[i];
00390   
00391   BookHistograms();
00392 
00393 }
00394 
00395 void IsolatedGenParticles::endJob() {
00396 }
00397 
00398 double IsolatedGenParticles::DeltaPhi(double v1, double v2) {
00399   // Computes the correctly normalized phi difference
00400   // v1, v2 = phi of object 1 and 2
00401   
00402   double pi    = 3.141592654;
00403   double twopi = 6.283185307;
00404   
00405   double diff = std::abs(v2 - v1);
00406   double corr = twopi - diff;
00407   if (diff < pi){ return diff;} else { return corr;} 
00408 }
00409 
00410 double IsolatedGenParticles::DeltaR(double eta1, double phi1, double eta2, double phi2) {
00411   double deta = eta1 - eta2;
00412   double dphi = DeltaPhi(phi1, phi2);
00413   return std::sqrt(deta*deta + dphi*dphi);
00414 }
00415 
00416 double IsolatedGenParticles::DeltaR2(double eta1, double phi1, double eta2, double phi2) {
00417   double deta = eta1 - eta2;
00418   double dphi = DeltaPhi(phi1, phi2);
00419   return deta*deta + dphi*dphi;
00420 }
00421 
00422 void IsolatedGenParticles::fillTrack (GlobalPoint & posVec, math::XYZTLorentzVector & momVec, GlobalPoint & posECAL, int pdgId, bool okECAL, bool accept) {
00423 
00424   if (accept) {
00425     t_isoTrkPAll        ->push_back( momVec.P() );
00426     t_isoTrkPtAll       ->push_back( momVec.Pt() );
00427     t_isoTrkPhiAll      ->push_back( momVec.phi() );
00428     t_isoTrkEtaAll      ->push_back( momVec.eta() );
00429     t_isoTrkPdgIdAll    ->push_back( pdgId ) ;
00430     if (okECAL) {
00431       double phi1 = momVec.phi();
00432       double phi2 = (posECAL - posVec).phi();
00433       double dphi = DeltaPhi( phi1, phi2 );
00434       double deta = momVec.eta() - (posECAL - posVec).eta();
00435       t_isoTrkDPhiAll ->push_back( dphi );
00436       t_isoTrkDEtaAll ->push_back( deta );      
00437     } else {
00438       t_isoTrkDPhiAll ->push_back( 999.0 );
00439       t_isoTrkDEtaAll ->push_back( 999.0 );     
00440     }
00441   } else {
00442     t_isoTrkDPhiAll ->push_back( -999.0 );
00443     t_isoTrkDEtaAll ->push_back( -999.0 );      
00444   }
00445 }
00446 
00447 void IsolatedGenParticles::fillIsolatedTrack(math::XYZTLorentzVector & momVec, GlobalPoint & posECAL, int pdgId) {
00448 
00449   t_isoTrkP           ->push_back(momVec.P());
00450   t_isoTrkPt          ->push_back(momVec.Pt());
00451   t_isoTrkEne         ->push_back(momVec.E());
00452   t_isoTrkEta         ->push_back(momVec.eta());
00453   t_isoTrkPhi         ->push_back(momVec.phi());
00454   t_isoTrkEtaEC       ->push_back(posECAL.eta());
00455   t_isoTrkPhiEC       ->push_back(posECAL.phi());
00456   t_isoTrkPdgId       ->push_back(pdgId);
00457   
00458   t_maxNearP31x31     ->push_back(isoinfo31x31.maxNearP);
00459   t_cHadronEne31x31   ->push_back(isoinfo31x31.cHadronEne);
00460   t_cHadronEne31x31_1 ->push_back(isoinfo31x31.cHadronEne_[0]);
00461   t_cHadronEne31x31_2 ->push_back(isoinfo31x31.cHadronEne_[1]);
00462   t_cHadronEne31x31_3 ->push_back(isoinfo31x31.cHadronEne_[2]);
00463   t_nHadronEne31x31   ->push_back(isoinfo31x31.nHadronEne);
00464   t_photonEne31x31    ->push_back(isoinfo31x31.photonEne);
00465   t_eleEne31x31       ->push_back(isoinfo31x31.eleEne);
00466   t_muEne31x31        ->push_back(isoinfo31x31.muEne);
00467           
00468   t_maxNearP25x25     ->push_back(isoinfo25x25.maxNearP);
00469   t_cHadronEne25x25   ->push_back(isoinfo25x25.cHadronEne);
00470   t_cHadronEne25x25_1 ->push_back(isoinfo25x25.cHadronEne_[0]);
00471   t_cHadronEne25x25_2 ->push_back(isoinfo25x25.cHadronEne_[1]);
00472   t_cHadronEne25x25_3 ->push_back(isoinfo25x25.cHadronEne_[2]);
00473   t_nHadronEne25x25   ->push_back(isoinfo25x25.nHadronEne);
00474   t_photonEne25x25    ->push_back(isoinfo25x25.photonEne);
00475   t_eleEne25x25       ->push_back(isoinfo25x25.eleEne);
00476   t_muEne25x25        ->push_back(isoinfo25x25.muEne);
00477           
00478   t_maxNearP21x21     ->push_back(isoinfo21x21.maxNearP);
00479   t_cHadronEne21x21   ->push_back(isoinfo21x21.cHadronEne);
00480   t_cHadronEne21x21_1 ->push_back(isoinfo21x21.cHadronEne_[0]);
00481   t_cHadronEne21x21_2 ->push_back(isoinfo21x21.cHadronEne_[1]);
00482   t_cHadronEne21x21_3 ->push_back(isoinfo21x21.cHadronEne_[2]);
00483   t_nHadronEne21x21   ->push_back(isoinfo21x21.nHadronEne);
00484   t_photonEne21x21    ->push_back(isoinfo21x21.photonEne);
00485   t_eleEne21x21       ->push_back(isoinfo21x21.eleEne);
00486   t_muEne21x21        ->push_back(isoinfo21x21.muEne);
00487           
00488   t_maxNearP15x15     ->push_back(isoinfo15x15.maxNearP);
00489   t_cHadronEne15x15   ->push_back(isoinfo15x15.cHadronEne);
00490   t_cHadronEne15x15_1 ->push_back(isoinfo15x15.cHadronEne_[0]);
00491   t_cHadronEne15x15_2 ->push_back(isoinfo15x15.cHadronEne_[1]);
00492   t_cHadronEne15x15_3 ->push_back(isoinfo15x15.cHadronEne_[2]);
00493   t_nHadronEne15x15   ->push_back(isoinfo15x15.nHadronEne);
00494   t_photonEne15x15    ->push_back(isoinfo15x15.photonEne);
00495   t_eleEne15x15       ->push_back(isoinfo15x15.eleEne);
00496   t_muEne15x15        ->push_back(isoinfo15x15.muEne);
00497           
00498   t_maxNearP11x11     ->push_back(isoinfo11x11.maxNearP);
00499   t_cHadronEne11x11   ->push_back(isoinfo11x11.cHadronEne);
00500   t_cHadronEne11x11_1 ->push_back(isoinfo11x11.cHadronEne_[0]);
00501   t_cHadronEne11x11_2 ->push_back(isoinfo11x11.cHadronEne_[1]);
00502   t_cHadronEne11x11_3 ->push_back(isoinfo11x11.cHadronEne_[2]);
00503   t_nHadronEne11x11   ->push_back(isoinfo11x11.nHadronEne);
00504   t_photonEne11x11    ->push_back(isoinfo11x11.photonEne);
00505   t_eleEne11x11       ->push_back(isoinfo11x11.eleEne);
00506   t_muEne11x11        ->push_back(isoinfo11x11.muEne);
00507           
00508   t_maxNearP9x9       ->push_back(isoinfo9x9.maxNearP);
00509   t_cHadronEne9x9     ->push_back(isoinfo9x9.cHadronEne);
00510   t_cHadronEne9x9_1   ->push_back(isoinfo9x9.cHadronEne_[0]);
00511   t_cHadronEne9x9_2   ->push_back(isoinfo9x9.cHadronEne_[1]);
00512   t_cHadronEne9x9_3   ->push_back(isoinfo9x9.cHadronEne_[2]);
00513   t_nHadronEne9x9     ->push_back(isoinfo9x9.nHadronEne);
00514   t_photonEne9x9      ->push_back(isoinfo9x9.photonEne);
00515   t_eleEne9x9         ->push_back(isoinfo9x9.eleEne);
00516   t_muEne9x9          ->push_back(isoinfo9x9.muEne);
00517             
00518   t_maxNearP7x7       ->push_back(isoinfo7x7.maxNearP);
00519   t_cHadronEne7x7     ->push_back(isoinfo7x7.cHadronEne);
00520   t_cHadronEne7x7_1   ->push_back(isoinfo7x7.cHadronEne_[0]);
00521   t_cHadronEne7x7_2   ->push_back(isoinfo7x7.cHadronEne_[1]);
00522   t_cHadronEne7x7_3   ->push_back(isoinfo7x7.cHadronEne_[2]);
00523   t_nHadronEne7x7     ->push_back(isoinfo7x7.nHadronEne);
00524   t_photonEne7x7      ->push_back(isoinfo7x7.photonEne);
00525   t_eleEne7x7         ->push_back(isoinfo7x7.eleEne);
00526   t_muEne7x7          ->push_back(isoinfo7x7.muEne);
00527   
00528   t_maxNearP3x3       ->push_back(isoinfo3x3.maxNearP);
00529   t_cHadronEne3x3     ->push_back(isoinfo3x3.cHadronEne);
00530   t_cHadronEne3x3_1   ->push_back(isoinfo3x3.cHadronEne_[0]);
00531   t_cHadronEne3x3_2   ->push_back(isoinfo3x3.cHadronEne_[1]);
00532   t_cHadronEne3x3_3   ->push_back(isoinfo3x3.cHadronEne_[2]);
00533   t_nHadronEne3x3     ->push_back(isoinfo3x3.nHadronEne);
00534   t_photonEne3x3      ->push_back(isoinfo3x3.photonEne);
00535   t_eleEne3x3         ->push_back(isoinfo3x3.eleEne);
00536   t_muEne3x3          ->push_back(isoinfo3x3.muEne);
00537 
00538   t_maxNearP1x1       ->push_back(isoinfo1x1.maxNearP);
00539   t_cHadronEne1x1     ->push_back(isoinfo1x1.cHadronEne);
00540   t_cHadronEne1x1_1   ->push_back(isoinfo1x1.cHadronEne_[0]);
00541   t_cHadronEne1x1_2   ->push_back(isoinfo1x1.cHadronEne_[1]);
00542   t_cHadronEne1x1_3   ->push_back(isoinfo1x1.cHadronEne_[2]);
00543   t_nHadronEne1x1     ->push_back(isoinfo1x1.nHadronEne);
00544   t_photonEne1x1      ->push_back(isoinfo1x1.photonEne);
00545   t_eleEne1x1         ->push_back(isoinfo1x1.eleEne);
00546   t_muEne1x1          ->push_back(isoinfo1x1.muEne);
00547 
00548   t_maxNearPHC1x1       ->push_back(isoinfoHC1x1.maxNearP);
00549   t_cHadronEneHC1x1     ->push_back(isoinfoHC1x1.cHadronEne);
00550   t_cHadronEneHC1x1_1   ->push_back(isoinfoHC1x1.cHadronEne_[0]);
00551   t_cHadronEneHC1x1_2   ->push_back(isoinfoHC1x1.cHadronEne_[1]);
00552   t_cHadronEneHC1x1_3   ->push_back(isoinfoHC1x1.cHadronEne_[2]);
00553   t_nHadronEneHC1x1     ->push_back(isoinfoHC1x1.nHadronEne);
00554   t_photonEneHC1x1      ->push_back(isoinfoHC1x1.photonEne);
00555   t_eleEneHC1x1         ->push_back(isoinfoHC1x1.eleEne);
00556   t_muEneHC1x1          ->push_back(isoinfoHC1x1.muEne);
00557   
00558   t_maxNearPHC3x3       ->push_back(isoinfoHC3x3.maxNearP);
00559   t_cHadronEneHC3x3     ->push_back(isoinfoHC3x3.cHadronEne);
00560   t_cHadronEneHC3x3_1   ->push_back(isoinfoHC3x3.cHadronEne_[0]);
00561   t_cHadronEneHC3x3_2   ->push_back(isoinfoHC3x3.cHadronEne_[1]);
00562   t_cHadronEneHC3x3_3   ->push_back(isoinfoHC3x3.cHadronEne_[2]);
00563   t_nHadronEneHC3x3     ->push_back(isoinfoHC3x3.nHadronEne);
00564   t_photonEneHC3x3      ->push_back(isoinfoHC3x3.photonEne);
00565   t_eleEneHC3x3         ->push_back(isoinfoHC3x3.eleEne);
00566   t_muEneHC3x3          ->push_back(isoinfoHC3x3.muEne);
00567 
00568   t_maxNearPHC5x5       ->push_back(isoinfoHC5x5.maxNearP);
00569   t_cHadronEneHC5x5     ->push_back(isoinfoHC5x5.cHadronEne);
00570   t_cHadronEneHC5x5_1   ->push_back(isoinfoHC5x5.cHadronEne_[0]);
00571   t_cHadronEneHC5x5_2   ->push_back(isoinfoHC5x5.cHadronEne_[1]);
00572   t_cHadronEneHC5x5_3   ->push_back(isoinfoHC5x5.cHadronEne_[2]);
00573   t_nHadronEneHC5x5     ->push_back(isoinfoHC5x5.nHadronEne);
00574   t_photonEneHC5x5      ->push_back(isoinfoHC5x5.photonEne);
00575   t_eleEneHC5x5         ->push_back(isoinfoHC5x5.eleEne);
00576   t_muEneHC5x5          ->push_back(isoinfoHC5x5.muEne);
00577 
00578   t_maxNearPHC7x7       ->push_back(isoinfoHC7x7.maxNearP);
00579   t_cHadronEneHC7x7     ->push_back(isoinfoHC7x7.cHadronEne);
00580   t_cHadronEneHC7x7_1   ->push_back(isoinfoHC7x7.cHadronEne_[0]);
00581   t_cHadronEneHC7x7_2   ->push_back(isoinfoHC7x7.cHadronEne_[1]);
00582   t_cHadronEneHC7x7_3   ->push_back(isoinfoHC7x7.cHadronEne_[2]);
00583   t_nHadronEneHC7x7     ->push_back(isoinfoHC7x7.nHadronEne);
00584   t_photonEneHC7x7      ->push_back(isoinfoHC7x7.photonEne);
00585   t_eleEneHC7x7         ->push_back(isoinfoHC7x7.eleEne);
00586   t_muEneHC7x7          ->push_back(isoinfoHC7x7.muEne);
00587 
00588   t_maxNearPR           ->push_back(isoinfoR.maxNearP);
00589   t_cHadronEneR         ->push_back(isoinfoR.cHadronEne);
00590   t_cHadronEneR_1       ->push_back(isoinfoR.cHadronEne_[0]);
00591   t_cHadronEneR_2       ->push_back(isoinfoR.cHadronEne_[1]);
00592   t_cHadronEneR_3       ->push_back(isoinfoR.cHadronEne_[2]);
00593   t_nHadronEneR         ->push_back(isoinfoR.nHadronEne);
00594   t_photonEneR          ->push_back(isoinfoR.photonEne);
00595   t_eleEneR             ->push_back(isoinfoR.eleEne);
00596   t_muEneR              ->push_back(isoinfoR.muEne);
00597 
00598   t_maxNearPIsoR        ->push_back(isoinfoIsoR.maxNearP);
00599   t_cHadronEneIsoR      ->push_back(isoinfoIsoR.cHadronEne);
00600   t_cHadronEneIsoR_1    ->push_back(isoinfoIsoR.cHadronEne_[0]);
00601   t_cHadronEneIsoR_2    ->push_back(isoinfoIsoR.cHadronEne_[1]);
00602   t_cHadronEneIsoR_3    ->push_back(isoinfoIsoR.cHadronEne_[2]);
00603   t_nHadronEneIsoR      ->push_back(isoinfoIsoR.nHadronEne);
00604   t_photonEneIsoR       ->push_back(isoinfoIsoR.photonEne);
00605   t_eleEneIsoR          ->push_back(isoinfoIsoR.eleEne);
00606   t_muEneIsoR           ->push_back(isoinfoIsoR.muEne);
00607 
00608   t_maxNearPHCR         ->push_back(isoinfoHCR.maxNearP);
00609   t_cHadronEneHCR       ->push_back(isoinfoHCR.cHadronEne);
00610   t_cHadronEneHCR_1     ->push_back(isoinfoHCR.cHadronEne_[0]);
00611   t_cHadronEneHCR_2     ->push_back(isoinfoHCR.cHadronEne_[1]);
00612   t_cHadronEneHCR_3     ->push_back(isoinfoHCR.cHadronEne_[2]);
00613   t_nHadronEneHCR       ->push_back(isoinfoHCR.nHadronEne);
00614   t_photonEneHCR        ->push_back(isoinfoHCR.photonEne);
00615   t_eleEneHCR           ->push_back(isoinfoHCR.eleEne);
00616   t_muEneHCR            ->push_back(isoinfoHCR.muEne);
00617 
00618   t_maxNearPIsoHCR      ->push_back(isoinfoIsoHCR.maxNearP);
00619   t_cHadronEneIsoHCR    ->push_back(isoinfoIsoHCR.cHadronEne);
00620   t_cHadronEneIsoHCR_1  ->push_back(isoinfoIsoHCR.cHadronEne_[0]);
00621   t_cHadronEneIsoHCR_2  ->push_back(isoinfoIsoHCR.cHadronEne_[1]);
00622   t_cHadronEneIsoHCR_3  ->push_back(isoinfoIsoHCR.cHadronEne_[2]);
00623   t_nHadronEneIsoHCR    ->push_back(isoinfoIsoHCR.nHadronEne);
00624   t_photonEneIsoHCR     ->push_back(isoinfoIsoHCR.photonEne);
00625   t_eleEneIsoHCR        ->push_back(isoinfoIsoHCR.eleEne);
00626   t_muEneIsoHCR         ->push_back(isoinfoIsoHCR.muEne);
00627 }
00628 
00629 void IsolatedGenParticles::BookHistograms(){
00630 
00631   //char hname[100], htit[100];
00632 
00633   h_NEventProc  = fs->make<TH1I>("h_NEventProc",  "h_NEventProc", 2, -0.5, 0.5);
00634   h_L1AlgoNames = fs->make<TH1I>("h_L1AlgoNames", "h_L1AlgoNames:Bin Labels", 128, -0.5, 127.5);  
00635 
00636   TFileDirectory dir1     = fs->mkdir( "dPhidEta" );
00637 
00638   // build the tree
00639   tree = fs->make<TTree>("tree", "tree");
00640 
00641   t_isoTrkPAll        = new std::vector<double>();
00642   t_isoTrkPtAll       = new std::vector<double>();
00643   t_isoTrkPhiAll      = new std::vector<double>();
00644   t_isoTrkEtaAll      = new std::vector<double>();
00645   t_isoTrkDPhiAll     = new std::vector<double>();
00646   t_isoTrkDEtaAll     = new std::vector<double>();
00647   t_isoTrkPdgIdAll    = new std::vector<double>();
00648 
00649   t_isoTrkP           = new std::vector<double>();
00650   t_isoTrkPt          = new std::vector<double>();
00651   t_isoTrkEne         = new std::vector<double>();
00652   t_isoTrkEta         = new std::vector<double>();
00653   t_isoTrkPhi         = new std::vector<double>();
00654   t_isoTrkEtaEC       = new std::vector<double>();
00655   t_isoTrkPhiEC       = new std::vector<double>();
00656   t_isoTrkPdgId       = new std::vector<double>();
00657   
00658   t_maxNearP31x31     = new std::vector<double>();
00659   t_cHadronEne31x31   = new std::vector<double>();
00660   t_cHadronEne31x31_1 = new std::vector<double>();
00661   t_cHadronEne31x31_2 = new std::vector<double>();
00662   t_cHadronEne31x31_3 = new std::vector<double>();
00663   t_nHadronEne31x31   = new std::vector<double>();
00664   t_photonEne31x31    = new std::vector<double>();
00665   t_eleEne31x31       = new std::vector<double>();
00666   t_muEne31x31        = new std::vector<double>();
00667 
00668   t_maxNearP25x25     = new std::vector<double>();
00669   t_cHadronEne25x25   = new std::vector<double>();
00670   t_cHadronEne25x25_1 = new std::vector<double>();
00671   t_cHadronEne25x25_2 = new std::vector<double>();
00672   t_cHadronEne25x25_3 = new std::vector<double>();
00673   t_nHadronEne25x25   = new std::vector<double>();
00674   t_photonEne25x25    = new std::vector<double>();
00675   t_eleEne25x25       = new std::vector<double>();
00676   t_muEne25x25        = new std::vector<double>();
00677 
00678   t_maxNearP21x21     = new std::vector<double>();
00679   t_cHadronEne21x21   = new std::vector<double>();
00680   t_cHadronEne21x21_1 = new std::vector<double>();
00681   t_cHadronEne21x21_2 = new std::vector<double>();
00682   t_cHadronEne21x21_3 = new std::vector<double>();
00683   t_nHadronEne21x21   = new std::vector<double>();
00684   t_photonEne21x21    = new std::vector<double>();
00685   t_eleEne21x21       = new std::vector<double>();
00686   t_muEne21x21        = new std::vector<double>();
00687 
00688   t_maxNearP15x15     = new std::vector<double>();
00689   t_cHadronEne15x15   = new std::vector<double>();
00690   t_cHadronEne15x15_1 = new std::vector<double>();
00691   t_cHadronEne15x15_2 = new std::vector<double>();
00692   t_cHadronEne15x15_3 = new std::vector<double>();
00693   t_nHadronEne15x15   = new std::vector<double>();
00694   t_photonEne15x15    = new std::vector<double>();
00695   t_eleEne15x15       = new std::vector<double>();
00696   t_muEne15x15        = new std::vector<double>();
00697 
00698   t_maxNearP11x11     = new std::vector<double>();
00699   t_cHadronEne11x11   = new std::vector<double>();
00700   t_cHadronEne11x11_1 = new std::vector<double>();
00701   t_cHadronEne11x11_2 = new std::vector<double>();
00702   t_cHadronEne11x11_3 = new std::vector<double>();
00703   t_nHadronEne11x11   = new std::vector<double>();
00704   t_photonEne11x11    = new std::vector<double>();
00705   t_eleEne11x11       = new std::vector<double>();
00706   t_muEne11x11        = new std::vector<double>();
00707 
00708   t_maxNearP9x9       = new std::vector<double>();
00709   t_cHadronEne9x9     = new std::vector<double>();
00710   t_cHadronEne9x9_1   = new std::vector<double>();
00711   t_cHadronEne9x9_2   = new std::vector<double>();
00712   t_cHadronEne9x9_3   = new std::vector<double>();
00713   t_nHadronEne9x9     = new std::vector<double>();
00714   t_photonEne9x9      = new std::vector<double>();
00715   t_eleEne9x9         = new std::vector<double>();
00716   t_muEne9x9          = new std::vector<double>();
00717 
00718   t_maxNearP7x7       = new std::vector<double>();
00719   t_cHadronEne7x7     = new std::vector<double>();
00720   t_cHadronEne7x7_1   = new std::vector<double>();
00721   t_cHadronEne7x7_2   = new std::vector<double>();
00722   t_cHadronEne7x7_3   = new std::vector<double>();
00723   t_nHadronEne7x7     = new std::vector<double>();
00724   t_photonEne7x7      = new std::vector<double>();
00725   t_eleEne7x7         = new std::vector<double>();
00726   t_muEne7x7          = new std::vector<double>();
00727 
00728   t_maxNearP3x3       = new std::vector<double>();
00729   t_cHadronEne3x3     = new std::vector<double>();
00730   t_cHadronEne3x3_1   = new std::vector<double>();
00731   t_cHadronEne3x3_2   = new std::vector<double>();
00732   t_cHadronEne3x3_3   = new std::vector<double>();
00733   t_nHadronEne3x3     = new std::vector<double>();
00734   t_photonEne3x3      = new std::vector<double>();
00735   t_eleEne3x3         = new std::vector<double>();
00736   t_muEne3x3          = new std::vector<double>();
00737 
00738   t_maxNearP1x1       = new std::vector<double>();
00739   t_cHadronEne1x1     = new std::vector<double>();
00740   t_cHadronEne1x1_1   = new std::vector<double>();
00741   t_cHadronEne1x1_2   = new std::vector<double>();
00742   t_cHadronEne1x1_3   = new std::vector<double>();
00743   t_nHadronEne1x1     = new std::vector<double>();
00744   t_photonEne1x1      = new std::vector<double>();
00745   t_eleEne1x1         = new std::vector<double>();
00746   t_muEne1x1          = new std::vector<double>();
00747 
00748   t_maxNearPHC1x1       = new std::vector<double>();
00749   t_cHadronEneHC1x1     = new std::vector<double>();
00750   t_cHadronEneHC1x1_1   = new std::vector<double>();
00751   t_cHadronEneHC1x1_2   = new std::vector<double>();
00752   t_cHadronEneHC1x1_3   = new std::vector<double>();
00753   t_nHadronEneHC1x1     = new std::vector<double>();
00754   t_photonEneHC1x1      = new std::vector<double>();
00755   t_eleEneHC1x1         = new std::vector<double>();
00756   t_muEneHC1x1          = new std::vector<double>();
00757 
00758   t_maxNearPHC3x3       = new std::vector<double>();
00759   t_cHadronEneHC3x3     = new std::vector<double>();
00760   t_cHadronEneHC3x3_1   = new std::vector<double>();
00761   t_cHadronEneHC3x3_2   = new std::vector<double>();
00762   t_cHadronEneHC3x3_3   = new std::vector<double>();
00763   t_nHadronEneHC3x3     = new std::vector<double>();
00764   t_photonEneHC3x3      = new std::vector<double>();
00765   t_eleEneHC3x3         = new std::vector<double>();
00766   t_muEneHC3x3          = new std::vector<double>();
00767 
00768   t_maxNearPHC5x5       = new std::vector<double>();
00769   t_cHadronEneHC5x5     = new std::vector<double>();
00770   t_cHadronEneHC5x5_1   = new std::vector<double>();
00771   t_cHadronEneHC5x5_2   = new std::vector<double>();
00772   t_cHadronEneHC5x5_3   = new std::vector<double>();
00773   t_nHadronEneHC5x5     = new std::vector<double>();
00774   t_photonEneHC5x5      = new std::vector<double>();
00775   t_eleEneHC5x5         = new std::vector<double>();
00776   t_muEneHC5x5          = new std::vector<double>();
00777 
00778   t_maxNearPHC7x7       = new std::vector<double>();
00779   t_cHadronEneHC7x7     = new std::vector<double>();
00780   t_cHadronEneHC7x7_1   = new std::vector<double>();
00781   t_cHadronEneHC7x7_2   = new std::vector<double>();
00782   t_cHadronEneHC7x7_3   = new std::vector<double>();
00783   t_nHadronEneHC7x7     = new std::vector<double>();
00784   t_photonEneHC7x7      = new std::vector<double>();
00785   t_eleEneHC7x7         = new std::vector<double>();
00786   t_muEneHC7x7          = new std::vector<double>();
00787 
00788   t_maxNearPR           = new std::vector<double>();
00789   t_cHadronEneR         = new std::vector<double>();
00790   t_cHadronEneR_1       = new std::vector<double>();
00791   t_cHadronEneR_2       = new std::vector<double>();
00792   t_cHadronEneR_3       = new std::vector<double>();
00793   t_nHadronEneR         = new std::vector<double>();
00794   t_photonEneR          = new std::vector<double>();
00795   t_eleEneR             = new std::vector<double>();
00796   t_muEneR              = new std::vector<double>();
00797 
00798   t_maxNearPIsoR        = new std::vector<double>();
00799   t_cHadronEneIsoR      = new std::vector<double>();
00800   t_cHadronEneIsoR_1    = new std::vector<double>();
00801   t_cHadronEneIsoR_2    = new std::vector<double>();
00802   t_cHadronEneIsoR_3    = new std::vector<double>();
00803   t_nHadronEneIsoR      = new std::vector<double>();
00804   t_photonEneIsoR       = new std::vector<double>();
00805   t_eleEneIsoR          = new std::vector<double>();
00806   t_muEneIsoR           = new std::vector<double>();
00807 
00808   t_maxNearPHCR         = new std::vector<double>();
00809   t_cHadronEneHCR       = new std::vector<double>();
00810   t_cHadronEneHCR_1     = new std::vector<double>();
00811   t_cHadronEneHCR_2     = new std::vector<double>();
00812   t_cHadronEneHCR_3     = new std::vector<double>();
00813   t_nHadronEneHCR       = new std::vector<double>();
00814   t_photonEneHCR        = new std::vector<double>();
00815   t_eleEneHCR           = new std::vector<double>();
00816   t_muEneHCR            = new std::vector<double>();
00817 
00818   t_maxNearPIsoHCR      = new std::vector<double>();
00819   t_cHadronEneIsoHCR    = new std::vector<double>();
00820   t_cHadronEneIsoHCR_1  = new std::vector<double>();
00821   t_cHadronEneIsoHCR_2  = new std::vector<double>();
00822   t_cHadronEneIsoHCR_3  = new std::vector<double>();
00823   t_nHadronEneIsoHCR    = new std::vector<double>();
00824   t_photonEneIsoHCR     = new std::vector<double>();
00825   t_eleEneIsoHCR        = new std::vector<double>();
00826   t_muEneIsoHCR         = new std::vector<double>();
00827 
00828   //----- L1Trigger 
00829   t_L1Decision        = new std::vector<int>();
00830   t_L1CenJetPt        = new std::vector<double>();
00831   t_L1CenJetEta       = new std::vector<double>();    
00832   t_L1CenJetPhi       = new std::vector<double>();
00833   t_L1FwdJetPt        = new std::vector<double>();
00834   t_L1FwdJetEta       = new std::vector<double>();
00835   t_L1FwdJetPhi       = new std::vector<double>();
00836   t_L1TauJetPt        = new std::vector<double>();
00837   t_L1TauJetEta       = new std::vector<double>();     
00838   t_L1TauJetPhi       = new std::vector<double>();
00839   t_L1MuonPt          = new std::vector<double>();
00840   t_L1MuonEta         = new std::vector<double>();     
00841   t_L1MuonPhi         = new std::vector<double>();
00842   t_L1IsoEMPt         = new std::vector<double>();
00843   t_L1IsoEMEta        = new std::vector<double>();
00844   t_L1IsoEMPhi        = new std::vector<double>();
00845   t_L1NonIsoEMPt      = new std::vector<double>();
00846   t_L1NonIsoEMEta     = new std::vector<double>();
00847   t_L1NonIsoEMPhi     = new std::vector<double>();
00848   t_L1METPt           = new std::vector<double>();
00849   t_L1METEta          = new std::vector<double>();
00850   t_L1METPhi          = new std::vector<double>();
00851   
00852   //tree->Branch("t_nEvtProc",          "vector<int>",    &t_nEvtProc);
00853 
00854   tree->Branch("t_isoTrkPAll",        "vector<double>", &t_isoTrkPAll);
00855   tree->Branch("t_isoTrkPtAll",       "vector<double>", &t_isoTrkPtAll);
00856   tree->Branch("t_isoTrkPhiAll",      "vector<double>", &t_isoTrkPhiAll);
00857   tree->Branch("t_isoTrkEtaAll",      "vector<double>", &t_isoTrkEtaAll);
00858   tree->Branch("t_isoTrkDPhiAll",     "vector<double>", &t_isoTrkDPhiAll);
00859   tree->Branch("t_isoTrkDEtaAll",     "vector<double>", &t_isoTrkDEtaAll);
00860   tree->Branch("t_isoTrkPdgIdAll",    "vector<double>", &t_isoTrkPdgIdAll);
00861 
00862   tree->Branch("t_isoTrkP",           "vector<double>", &t_isoTrkP);
00863   tree->Branch("t_isoTrkPt",          "vector<double>", &t_isoTrkPt);
00864   tree->Branch("t_isoTrkEne",         "vector<double>", &t_isoTrkEne);
00865   tree->Branch("t_isoTrkEta",         "vector<double>", &t_isoTrkEta);
00866   tree->Branch("t_isoTrkPhi",         "vector<double>", &t_isoTrkPhi);
00867   tree->Branch("t_isoTrkEtaEC",       "vector<double>", &t_isoTrkEtaEC);
00868   tree->Branch("t_isoTrkPhiEC",       "vector<double>", &t_isoTrkPhiEC);
00869   tree->Branch("t_isoTrkPdgId",       "vector<double>", &t_isoTrkPdgId);
00870 
00871   tree->Branch("t_maxNearP31x31",     "vector<double>", &t_maxNearP31x31);
00872   tree->Branch("t_cHadronEne31x31",   "vector<double>", &t_cHadronEne31x31);
00873   tree->Branch("t_cHadronEne31x31_1", "vector<double>", &t_cHadronEne31x31_1);
00874   tree->Branch("t_cHadronEne31x31_2", "vector<double>", &t_cHadronEne31x31_2);
00875   tree->Branch("t_cHadronEne31x31_3", "vector<double>", &t_cHadronEne31x31_3);
00876   tree->Branch("t_nHadronEne31x31",   "vector<double>", &t_nHadronEne31x31);
00877   tree->Branch("t_photonEne31x31",    "vector<double>", &t_photonEne31x31);
00878   tree->Branch("t_eleEne31x31",       "vector<double>", &t_eleEne31x31);
00879   tree->Branch("t_muEne31x31",        "vector<double>", &t_muEne31x31);
00880 
00881   tree->Branch("t_maxNearP25x25",     "vector<double>", &t_maxNearP25x25);
00882   tree->Branch("t_cHadronEne25x25",   "vector<double>", &t_cHadronEne25x25);
00883   tree->Branch("t_cHadronEne25x25_1", "vector<double>", &t_cHadronEne25x25_1);
00884   tree->Branch("t_cHadronEne25x25_2", "vector<double>", &t_cHadronEne25x25_2);
00885   tree->Branch("t_cHadronEne25x25_3", "vector<double>", &t_cHadronEne25x25_3);
00886   tree->Branch("t_nHadronEne25x25",   "vector<double>", &t_nHadronEne25x25);
00887   tree->Branch("t_photonEne25x25",    "vector<double>", &t_photonEne25x25);
00888   tree->Branch("t_eleEne25x25",       "vector<double>", &t_eleEne25x25);
00889   tree->Branch("t_muEne25x25",        "vector<double>", &t_muEne25x25);
00890   
00891   tree->Branch("t_maxNearP21x21",     "vector<double>", &t_maxNearP21x21);
00892   tree->Branch("t_cHadronEne21x21",   "vector<double>", &t_cHadronEne21x21);
00893   tree->Branch("t_cHadronEne21x21_1", "vector<double>", &t_cHadronEne21x21_1);
00894   tree->Branch("t_cHadronEne21x21_2", "vector<double>", &t_cHadronEne21x21_2);
00895   tree->Branch("t_cHadronEne21x21_3", "vector<double>", &t_cHadronEne21x21_3);
00896   tree->Branch("t_nHadronEne21x21",   "vector<double>", &t_nHadronEne21x21);
00897   tree->Branch("t_photonEne21x21",    "vector<double>", &t_photonEne21x21);
00898   tree->Branch("t_eleEne21x21",       "vector<double>", &t_eleEne21x21);
00899   tree->Branch("t_muEne21x21",        "vector<double>", &t_muEne21x21);
00900 
00901   tree->Branch("t_maxNearP15x15",     "vector<double>", &t_maxNearP15x15);
00902   tree->Branch("t_cHadronEne15x15",   "vector<double>", &t_cHadronEne15x15);
00903   tree->Branch("t_cHadronEne15x15_1", "vector<double>", &t_cHadronEne15x15_1);
00904   tree->Branch("t_cHadronEne15x15_2", "vector<double>", &t_cHadronEne15x15_2);
00905   tree->Branch("t_cHadronEne15x15_3", "vector<double>", &t_cHadronEne15x15_3);
00906   tree->Branch("t_nHadronEne15x15",   "vector<double>", &t_nHadronEne15x15);
00907   tree->Branch("t_photonEne15x15",    "vector<double>", &t_photonEne15x15);
00908   tree->Branch("t_eleEne15x15",       "vector<double>", &t_eleEne15x15);
00909   tree->Branch("t_muEne15x15",        "vector<double>", &t_muEne15x15);
00910 
00911   tree->Branch("t_maxNearP11x11",     "vector<double>", &t_maxNearP11x11);
00912   tree->Branch("t_cHadronEne11x11",   "vector<double>", &t_cHadronEne11x11);
00913   tree->Branch("t_cHadronEne11x11_1", "vector<double>", &t_cHadronEne11x11_1);
00914   tree->Branch("t_cHadronEne11x11_2", "vector<double>", &t_cHadronEne11x11_2);
00915   tree->Branch("t_cHadronEne11x11_3", "vector<double>", &t_cHadronEne11x11_3);
00916   tree->Branch("t_nHadronEne11x11",   "vector<double>", &t_nHadronEne11x11);
00917   tree->Branch("t_photonEne11x11",    "vector<double>", &t_photonEne11x11);
00918   tree->Branch("t_eleEne11x11",       "vector<double>", &t_eleEne11x11);
00919   tree->Branch("t_muEne11x11",        "vector<double>", &t_muEne11x11);
00920 
00921   tree->Branch("t_maxNearP9x9",       "vector<double>", &t_maxNearP9x9);
00922   tree->Branch("t_cHadronEne9x9",     "vector<double>", &t_cHadronEne9x9);
00923   tree->Branch("t_cHadronEne9x9_1",   "vector<double>", &t_cHadronEne9x9_1);
00924   tree->Branch("t_cHadronEne9x9_2",   "vector<double>", &t_cHadronEne9x9_2);
00925   tree->Branch("t_cHadronEne9x9_3",   "vector<double>", &t_cHadronEne9x9_3);
00926   tree->Branch("t_nHadronEne9x9",     "vector<double>", &t_nHadronEne9x9);
00927   tree->Branch("t_photonEne9x9",      "vector<double>", &t_photonEne9x9);
00928   tree->Branch("t_eleEne9x9",         "vector<double>", &t_eleEne9x9);
00929   tree->Branch("t_muEne9x9",          "vector<double>", &t_muEne9x9);
00930 
00931   tree->Branch("t_maxNearP7x7",       "vector<double>", &t_maxNearP7x7);
00932   tree->Branch("t_cHadronEne7x7",     "vector<double>", &t_cHadronEne7x7);
00933   tree->Branch("t_cHadronEne7x7_1",   "vector<double>", &t_cHadronEne7x7_1);
00934   tree->Branch("t_cHadronEne7x7_2",   "vector<double>", &t_cHadronEne7x7_2);
00935   tree->Branch("t_cHadronEne7x7_3",   "vector<double>", &t_cHadronEne7x7_3);
00936   tree->Branch("t_nHadronEne7x7",     "vector<double>", &t_nHadronEne7x7);
00937   tree->Branch("t_photonEne7x7",      "vector<double>", &t_photonEne7x7);
00938   tree->Branch("t_eleEne7x7",         "vector<double>", &t_eleEne7x7);
00939   tree->Branch("t_muEne7x7",          "vector<double>", &t_muEne7x7);
00940 
00941   tree->Branch("t_maxNearP3x3",       "vector<double>", &t_maxNearP3x3);
00942   tree->Branch("t_cHadronEne3x3",     "vector<double>", &t_cHadronEne3x3);
00943   tree->Branch("t_cHadronEne3x3_1",   "vector<double>", &t_cHadronEne3x3_1);
00944   tree->Branch("t_cHadronEne3x3_2",   "vector<double>", &t_cHadronEne3x3_2);
00945   tree->Branch("t_cHadronEne3x3_3",   "vector<double>", &t_cHadronEne3x3_3);
00946   tree->Branch("t_nHadronEne3x3",     "vector<double>", &t_nHadronEne3x3);
00947   tree->Branch("t_photonEne3x3",      "vector<double>", &t_photonEne3x3);
00948   tree->Branch("t_eleEne3x3",         "vector<double>", &t_eleEne3x3);
00949   tree->Branch("t_muEne3x3",          "vector<double>", &t_muEne3x3);
00950 
00951   tree->Branch("t_maxNearP1x1",       "vector<double>", &t_maxNearP1x1);
00952   tree->Branch("t_cHadronEne1x1",     "vector<double>", &t_cHadronEne1x1);
00953   tree->Branch("t_cHadronEne1x1_1",   "vector<double>", &t_cHadronEne1x1_1);
00954   tree->Branch("t_cHadronEne1x1_2",   "vector<double>", &t_cHadronEne1x1_2);
00955   tree->Branch("t_cHadronEne1x1_3",   "vector<double>", &t_cHadronEne1x1_3);
00956   tree->Branch("t_nHadronEne1x1",     "vector<double>", &t_nHadronEne1x1);
00957   tree->Branch("t_photonEne1x1",      "vector<double>", &t_photonEne1x1);
00958   tree->Branch("t_eleEne1x1",         "vector<double>", &t_eleEne1x1);
00959   tree->Branch("t_muEne1x1",          "vector<double>", &t_muEne1x1);
00960 
00961   tree->Branch("t_maxNearPHC1x1",       "vector<double>", &t_maxNearPHC1x1);
00962   tree->Branch("t_cHadronEneHC1x1",     "vector<double>", &t_cHadronEneHC1x1);
00963   tree->Branch("t_cHadronEneHC1x1_1",   "vector<double>", &t_cHadronEneHC1x1_1);
00964   tree->Branch("t_cHadronEneHC1x1_2",   "vector<double>", &t_cHadronEneHC1x1_2);
00965   tree->Branch("t_cHadronEneHC1x1_3",   "vector<double>", &t_cHadronEneHC1x1_3);
00966   tree->Branch("t_nHadronEneHC1x1",     "vector<double>", &t_nHadronEneHC1x1);
00967   tree->Branch("t_photonEneHC1x1",      "vector<double>", &t_photonEneHC1x1);
00968   tree->Branch("t_eleEneHC1x1",         "vector<double>", &t_eleEneHC1x1);
00969   tree->Branch("t_muEneHC1x1",          "vector<double>", &t_muEneHC1x1);
00970 
00971   tree->Branch("t_maxNearPHC3x3",       "vector<double>", &t_maxNearPHC3x3);
00972   tree->Branch("t_cHadronEneHC3x3",     "vector<double>", &t_cHadronEneHC3x3);
00973   tree->Branch("t_cHadronEneHC3x3_1",   "vector<double>", &t_cHadronEneHC3x3_1);
00974   tree->Branch("t_cHadronEneHC3x3_2",   "vector<double>", &t_cHadronEneHC3x3_2);
00975   tree->Branch("t_cHadronEneHC3x3_3",   "vector<double>", &t_cHadronEneHC3x3_3);
00976   tree->Branch("t_nHadronEneHC3x3",     "vector<double>", &t_nHadronEneHC3x3);
00977   tree->Branch("t_photonEneHC3x3",      "vector<double>", &t_photonEneHC3x3);
00978   tree->Branch("t_eleEneHC3x3",         "vector<double>", &t_eleEneHC3x3);
00979   tree->Branch("t_muEneHC3x3",          "vector<double>", &t_muEneHC3x3);
00980 
00981   tree->Branch("t_maxNearPHC5x5",       "vector<double>", &t_maxNearPHC5x5);
00982   tree->Branch("t_cHadronEneHC5x5",     "vector<double>", &t_cHadronEneHC5x5);
00983   tree->Branch("t_cHadronEneHC5x5_1",   "vector<double>", &t_cHadronEneHC5x5_1);
00984   tree->Branch("t_cHadronEneHC5x5_2",   "vector<double>", &t_cHadronEneHC5x5_2);
00985   tree->Branch("t_cHadronEneHC5x5_3",   "vector<double>", &t_cHadronEneHC5x5_3);
00986   tree->Branch("t_nHadronEneHC5x5",     "vector<double>", &t_nHadronEneHC5x5);
00987   tree->Branch("t_photonEneHC5x5",      "vector<double>", &t_photonEneHC5x5);
00988   tree->Branch("t_eleEneHC5x5",         "vector<double>", &t_eleEneHC5x5);
00989   tree->Branch("t_muEneHC5x5",          "vector<double>", &t_muEneHC5x5);
00990 
00991   tree->Branch("t_maxNearPHC7x7",       "vector<double>", &t_maxNearPHC7x7);
00992   tree->Branch("t_cHadronEneHC7x7",     "vector<double>", &t_cHadronEneHC7x7);
00993   tree->Branch("t_cHadronEneHC7x7_1",   "vector<double>", &t_cHadronEneHC7x7_1);
00994   tree->Branch("t_cHadronEneHC7x7_2",   "vector<double>", &t_cHadronEneHC7x7_2);
00995   tree->Branch("t_cHadronEneHC7x7_3",   "vector<double>", &t_cHadronEneHC7x7_3);
00996   tree->Branch("t_nHadronEneHC7x7",     "vector<double>", &t_nHadronEneHC7x7);
00997   tree->Branch("t_photonEneHC7x7",      "vector<double>", &t_photonEneHC7x7);
00998   tree->Branch("t_eleEneHC7x7",         "vector<double>", &t_eleEneHC7x7);
00999   tree->Branch("t_muEneHC7x7",          "vector<double>", &t_muEneHC7x7);
01000 
01001   tree->Branch("t_maxNearPR",       "vector<double>", &t_maxNearPR);
01002   tree->Branch("t_cHadronEneR",     "vector<double>", &t_cHadronEneR);
01003   tree->Branch("t_cHadronEneR_1",   "vector<double>", &t_cHadronEneR_1);
01004   tree->Branch("t_cHadronEneR_2",   "vector<double>", &t_cHadronEneR_2);
01005   tree->Branch("t_cHadronEneR_3",   "vector<double>", &t_cHadronEneR_3);
01006   tree->Branch("t_nHadronEneR",     "vector<double>", &t_nHadronEneR);
01007   tree->Branch("t_photonEneR",      "vector<double>", &t_photonEneR);
01008   tree->Branch("t_eleEneR",         "vector<double>", &t_eleEneR);
01009   tree->Branch("t_muEneR",          "vector<double>", &t_muEneR);
01010 
01011   tree->Branch("t_maxNearPIsoR",       "vector<double>", &t_maxNearPIsoR);
01012   tree->Branch("t_cHadronEneIsoR",     "vector<double>", &t_cHadronEneIsoR);
01013   tree->Branch("t_cHadronEneIsoR_1",   "vector<double>", &t_cHadronEneIsoR_1);
01014   tree->Branch("t_cHadronEneIsoR_2",   "vector<double>", &t_cHadronEneIsoR_2);
01015   tree->Branch("t_cHadronEneIsoR_3",   "vector<double>", &t_cHadronEneIsoR_3);
01016   tree->Branch("t_nHadronEneIsoR",     "vector<double>", &t_nHadronEneIsoR);
01017   tree->Branch("t_photonEneIsoR",      "vector<double>", &t_photonEneIsoR);
01018   tree->Branch("t_eleEneIsoR",         "vector<double>", &t_eleEneIsoR);
01019   tree->Branch("t_muEneIsoR",          "vector<double>", &t_muEneIsoR);
01020 
01021   tree->Branch("t_maxNearPHCR",       "vector<double>", &t_maxNearPHCR);
01022   tree->Branch("t_cHadronEneHCR",     "vector<double>", &t_cHadronEneHCR);
01023   tree->Branch("t_cHadronEneHCR_1",   "vector<double>", &t_cHadronEneHCR_1);
01024   tree->Branch("t_cHadronEneHCR_2",   "vector<double>", &t_cHadronEneHCR_2);
01025   tree->Branch("t_cHadronEneHCR_3",   "vector<double>", &t_cHadronEneHCR_3);
01026   tree->Branch("t_nHadronEneHCR",     "vector<double>", &t_nHadronEneHCR);
01027   tree->Branch("t_photonEneHCR",      "vector<double>", &t_photonEneHCR);
01028   tree->Branch("t_eleEneHCR",         "vector<double>", &t_eleEneHCR);
01029   tree->Branch("t_muEneHCR",          "vector<double>", &t_muEneHCR);
01030 
01031   tree->Branch("t_maxNearPIsoHCR",       "vector<double>", &t_maxNearPIsoHCR);
01032   tree->Branch("t_cHadronEneIsoHCR",     "vector<double>", &t_cHadronEneIsoHCR);
01033   tree->Branch("t_cHadronEneIsoHCR_1",   "vector<double>", &t_cHadronEneIsoHCR_1);
01034   tree->Branch("t_cHadronEneIsoHCR_2",   "vector<double>", &t_cHadronEneIsoHCR_2);
01035   tree->Branch("t_cHadronEneIsoHCR_3",   "vector<double>", &t_cHadronEneIsoHCR_3);
01036   tree->Branch("t_nHadronEneIsoHCR",     "vector<double>", &t_nHadronEneIsoHCR);
01037   tree->Branch("t_photonEneIsoHCR",      "vector<double>", &t_photonEneIsoHCR);
01038   tree->Branch("t_eleEneIsoHCR",         "vector<double>", &t_eleEneIsoHCR);
01039   tree->Branch("t_muEneIsoHCR",          "vector<double>", &t_muEneIsoHCR);
01040 
01041   tree->Branch("t_L1Decision",        "vector<int>",    &t_L1Decision);
01042   tree->Branch("t_L1CenJetPt",        "vector<double>", &t_L1CenJetPt);
01043   tree->Branch("t_L1CenJetEta",       "vector<double>", &t_L1CenJetEta);
01044   tree->Branch("t_L1CenJetPhi",       "vector<double>", &t_L1CenJetPhi);
01045   tree->Branch("t_L1FwdJetPt",        "vector<double>", &t_L1FwdJetPt);
01046   tree->Branch("t_L1FwdJetEta",       "vector<double>", &t_L1FwdJetEta);
01047   tree->Branch("t_L1FwdJetPhi",       "vector<double>", &t_L1FwdJetPhi);
01048   tree->Branch("t_L1TauJetPt",        "vector<double>", &t_L1TauJetPt);
01049   tree->Branch("t_L1TauJetEta",       "vector<double>", &t_L1TauJetEta);     
01050   tree->Branch("t_L1TauJetPhi",       "vector<double>", &t_L1TauJetPhi);
01051   tree->Branch("t_L1MuonPt",          "vector<double>", &t_L1MuonPt);
01052   tree->Branch("t_L1MuonEta",         "vector<double>", &t_L1MuonEta);
01053   tree->Branch("t_L1MuonPhi",         "vector<double>", &t_L1MuonPhi);
01054   tree->Branch("t_L1IsoEMPt",         "vector<double>", &t_L1IsoEMPt);
01055   tree->Branch("t_L1IsoEMEta",        "vector<double>", &t_L1IsoEMEta);
01056   tree->Branch("t_L1IsoEMPhi",        "vector<double>", &t_L1IsoEMPhi);
01057   tree->Branch("t_L1NonIsoEMPt",      "vector<double>", &t_L1NonIsoEMPt);
01058   tree->Branch("t_L1NonIsoEMEta",     "vector<double>", &t_L1NonIsoEMEta);
01059   tree->Branch("t_L1NonIsoEMPhi",     "vector<double>", &t_L1NonIsoEMPhi);
01060   tree->Branch("t_L1METPt",           "vector<double>", &t_L1METPt);
01061   tree->Branch("t_L1METEta",          "vector<double>", &t_L1METEta);
01062   tree->Branch("t_L1METPhi",          "vector<double>", &t_L1METPhi);
01063 }
01064 
01065 
01066 void IsolatedGenParticles::clearTreeVectors() {
01067   //  t_maxNearP31x31->clear();
01068   
01069   //t_nEvtProc          ->clear();
01070 
01071   t_isoTrkPAll        ->clear();
01072   t_isoTrkPtAll       ->clear();
01073   t_isoTrkPhiAll      ->clear();
01074   t_isoTrkEtaAll      ->clear();
01075   t_isoTrkDPhiAll     ->clear();
01076   t_isoTrkDEtaAll     ->clear();
01077   t_isoTrkPdgIdAll    ->clear();
01078 
01079   t_isoTrkP           ->clear();
01080   t_isoTrkPt          ->clear();
01081   t_isoTrkEne         ->clear();
01082   t_isoTrkEta         ->clear();
01083   t_isoTrkPhi         ->clear();
01084   t_isoTrkEtaEC       ->clear();
01085   t_isoTrkPhiEC       ->clear();
01086   t_isoTrkPdgId       ->clear();
01087 
01088   t_maxNearP31x31     ->clear();
01089   t_cHadronEne31x31   ->clear();
01090   t_cHadronEne31x31_1 ->clear();
01091   t_cHadronEne31x31_2 ->clear();
01092   t_cHadronEne31x31_3 ->clear();
01093   t_nHadronEne31x31   ->clear();
01094   t_photonEne31x31    ->clear();
01095   t_eleEne31x31       ->clear();
01096   t_muEne31x31        ->clear();
01097 
01098   t_maxNearP25x25     ->clear();
01099   t_cHadronEne25x25   ->clear();
01100   t_cHadronEne25x25_1 ->clear();
01101   t_cHadronEne25x25_2 ->clear();
01102   t_cHadronEne25x25_3 ->clear();
01103   t_nHadronEne25x25   ->clear();
01104   t_photonEne25x25    ->clear();
01105   t_eleEne25x25       ->clear();
01106   t_muEne25x25        ->clear();
01107 
01108   t_maxNearP21x21     ->clear();
01109   t_cHadronEne21x21   ->clear();
01110   t_cHadronEne21x21_1 ->clear();
01111   t_cHadronEne21x21_2 ->clear();
01112   t_cHadronEne21x21_3 ->clear();
01113   t_nHadronEne21x21   ->clear();
01114   t_photonEne21x21    ->clear();
01115   t_eleEne21x21       ->clear();
01116   t_muEne21x21        ->clear();
01117 
01118   t_maxNearP15x15     ->clear();
01119   t_cHadronEne15x15   ->clear();
01120   t_cHadronEne15x15_1 ->clear();
01121   t_cHadronEne15x15_2 ->clear();
01122   t_cHadronEne15x15_3 ->clear();
01123   t_nHadronEne15x15   ->clear();
01124   t_photonEne15x15    ->clear();
01125   t_eleEne15x15       ->clear();
01126   t_muEne15x15        ->clear();
01127 
01128   t_maxNearP11x11     ->clear();
01129   t_cHadronEne11x11   ->clear();
01130   t_cHadronEne11x11_1 ->clear();
01131   t_cHadronEne11x11_2 ->clear();
01132   t_cHadronEne11x11_3 ->clear();
01133   t_nHadronEne11x11   ->clear();
01134   t_photonEne11x11    ->clear();
01135   t_eleEne11x11       ->clear();
01136   t_muEne11x11        ->clear();
01137 
01138   t_maxNearP9x9       ->clear();
01139   t_cHadronEne9x9     ->clear();
01140   t_cHadronEne9x9_1   ->clear();
01141   t_cHadronEne9x9_2   ->clear();
01142   t_cHadronEne9x9_3   ->clear();
01143   t_nHadronEne9x9     ->clear();
01144   t_photonEne9x9      ->clear();
01145   t_eleEne9x9         ->clear();
01146   t_muEne9x9          ->clear();
01147 
01148   t_maxNearP7x7       ->clear();
01149   t_cHadronEne7x7     ->clear();
01150   t_cHadronEne7x7_1   ->clear();
01151   t_cHadronEne7x7_2   ->clear();
01152   t_cHadronEne7x7_3   ->clear();
01153   t_nHadronEne7x7     ->clear();
01154   t_photonEne7x7      ->clear();
01155   t_eleEne7x7         ->clear();
01156   t_muEne7x7          ->clear();
01157 
01158   t_maxNearP3x3       ->clear();
01159   t_cHadronEne3x3     ->clear();
01160   t_cHadronEne3x3_1   ->clear();
01161   t_cHadronEne3x3_2   ->clear();
01162   t_cHadronEne3x3_3   ->clear();
01163   t_nHadronEne3x3     ->clear();
01164   t_photonEne3x3      ->clear();
01165   t_eleEne3x3         ->clear();
01166   t_muEne3x3          ->clear();
01167 
01168   t_maxNearP1x1       ->clear();
01169   t_cHadronEne1x1     ->clear();
01170   t_cHadronEne1x1_1   ->clear();
01171   t_cHadronEne1x1_2   ->clear();
01172   t_cHadronEne1x1_3   ->clear();
01173   t_nHadronEne1x1     ->clear();
01174   t_photonEne1x1      ->clear();
01175   t_eleEne1x1         ->clear();
01176   t_muEne1x1          ->clear();
01177 
01178   t_maxNearPHC1x1       ->clear();
01179   t_cHadronEneHC1x1     ->clear();
01180   t_cHadronEneHC1x1_1   ->clear();
01181   t_cHadronEneHC1x1_2   ->clear();
01182   t_cHadronEneHC1x1_3   ->clear();
01183   t_nHadronEneHC1x1     ->clear();
01184   t_photonEneHC1x1      ->clear();
01185   t_eleEneHC1x1         ->clear();
01186   t_muEneHC1x1          ->clear();
01187 
01188   t_maxNearPHC3x3       ->clear();
01189   t_cHadronEneHC3x3     ->clear();
01190   t_cHadronEneHC3x3_1   ->clear();
01191   t_cHadronEneHC3x3_2   ->clear();
01192   t_cHadronEneHC3x3_3   ->clear();
01193   t_nHadronEneHC3x3     ->clear();
01194   t_photonEneHC3x3      ->clear();
01195   t_eleEneHC3x3         ->clear();
01196   t_muEneHC3x3          ->clear();
01197 
01198   t_maxNearPHC5x5       ->clear();
01199   t_cHadronEneHC5x5     ->clear();
01200   t_cHadronEneHC5x5_1   ->clear();
01201   t_cHadronEneHC5x5_2   ->clear();
01202   t_cHadronEneHC5x5_3   ->clear();
01203   t_nHadronEneHC5x5     ->clear();
01204   t_photonEneHC5x5      ->clear();
01205   t_eleEneHC5x5         ->clear();
01206   t_muEneHC5x5          ->clear();
01207 
01208   t_maxNearPHC7x7       ->clear();
01209   t_cHadronEneHC7x7     ->clear();
01210   t_cHadronEneHC7x7_1   ->clear();
01211   t_cHadronEneHC7x7_2   ->clear();
01212   t_cHadronEneHC7x7_3   ->clear();
01213   t_nHadronEneHC7x7     ->clear();
01214   t_photonEneHC7x7      ->clear();
01215   t_eleEneHC7x7         ->clear();
01216   t_muEneHC7x7          ->clear();
01217 
01218   t_maxNearPR           ->clear();
01219   t_cHadronEneR         ->clear();
01220   t_cHadronEneR_1       ->clear();
01221   t_cHadronEneR_2       ->clear();
01222   t_cHadronEneR_3       ->clear();
01223   t_nHadronEneR         ->clear();
01224   t_photonEneR          ->clear();
01225   t_eleEneR             ->clear();
01226   t_muEneR              ->clear();
01227 
01228   t_maxNearPIsoR        ->clear();
01229   t_cHadronEneIsoR      ->clear();
01230   t_cHadronEneIsoR_1    ->clear();
01231   t_cHadronEneIsoR_2    ->clear();
01232   t_cHadronEneIsoR_3    ->clear();
01233   t_nHadronEneIsoR      ->clear();
01234   t_photonEneIsoR       ->clear();
01235   t_eleEneIsoR          ->clear();
01236   t_muEneIsoR           ->clear();
01237 
01238   t_maxNearPHCR         ->clear();
01239   t_cHadronEneHCR       ->clear();
01240   t_cHadronEneHCR_1     ->clear();
01241   t_cHadronEneHCR_2     ->clear();
01242   t_cHadronEneHCR_3     ->clear();
01243   t_nHadronEneHCR       ->clear();
01244   t_photonEneHCR        ->clear();
01245   t_eleEneHCR           ->clear();
01246   t_muEneHCR            ->clear();
01247 
01248   t_maxNearPIsoHCR      ->clear();
01249   t_cHadronEneIsoHCR    ->clear();
01250   t_cHadronEneIsoHCR_1  ->clear();
01251   t_cHadronEneIsoHCR_2  ->clear();
01252   t_cHadronEneIsoHCR_3  ->clear();
01253   t_nHadronEneIsoHCR    ->clear();
01254   t_photonEneIsoHCR     ->clear();
01255   t_eleEneIsoHCR        ->clear();
01256   t_muEneIsoHCR         ->clear();
01257 
01258   t_L1Decision        ->clear();
01259   t_L1CenJetPt        ->clear();
01260   t_L1CenJetEta       ->clear();    
01261   t_L1CenJetPhi       ->clear();
01262   t_L1FwdJetPt        ->clear();
01263   t_L1FwdJetEta       ->clear();
01264   t_L1FwdJetPhi       ->clear();
01265   t_L1TauJetPt        ->clear();
01266   t_L1TauJetEta       ->clear();     
01267   t_L1TauJetPhi       ->clear();
01268   t_L1MuonPt          ->clear();
01269   t_L1MuonEta         ->clear();     
01270   t_L1MuonPhi         ->clear();
01271   t_L1IsoEMPt         ->clear();
01272   t_L1IsoEMEta        ->clear();
01273   t_L1IsoEMPhi        ->clear();
01274   t_L1NonIsoEMPt      ->clear();
01275   t_L1NonIsoEMEta     ->clear();
01276   t_L1NonIsoEMPhi     ->clear();
01277   t_L1METPt           ->clear();
01278   t_L1METEta          ->clear();
01279   t_L1METPhi          ->clear();
01280 }
01281 
01282 //define this as a plug-in
01283 DEFINE_FWK_MODULE(IsolatedGenParticles);