[264] | 1 | /*
|
---|
| 2 | ---- FastSim ----
|
---|
| 3 | A Fast Simulator for general purpose LHC detector
|
---|
| 4 | S. Ovyn ~~~~ severine.ovyn@uclouvain.be
|
---|
[9] | 5 |
|
---|
[264] | 6 | Center for Particle Physics and Phenomenology (CP3)
|
---|
| 7 | Universite Catholique de Louvain (UCL)
|
---|
| 8 | Louvain-la-Neuve, Belgium
|
---|
| 9 | */
|
---|
| 10 |
|
---|
| 11 | /// \file Smearing.cpp
|
---|
| 12 | /// \brief executable for the FastSim
|
---|
| 13 |
|
---|
[9] | 14 | #include "TChain.h"
|
---|
| 15 | #include "TApplication.h"
|
---|
[227] | 16 | #include "TFile.h"
|
---|
[9] | 17 |
|
---|
[227] | 18 | #include "ExRootTreeReader.h"
|
---|
| 19 | #include "ExRootTreeWriter.h"
|
---|
| 20 | #include "ExRootTreeBranch.h"
|
---|
| 21 | #include "TreeClasses.h"
|
---|
[9] | 22 |
|
---|
[227] | 23 | #include "DataConverter.h"
|
---|
| 24 | #include "HEPEVTConverter.h"
|
---|
| 25 | #include "LHEFConverter.h"
|
---|
| 26 | #include "STDHEPConverter.h"
|
---|
[9] | 27 |
|
---|
[227] | 28 | #include "SmearUtil.h"
|
---|
| 29 | #include "JetsUtil.h"
|
---|
| 30 | #include "BFieldProp.h"
|
---|
[19] | 31 |
|
---|
[264] | 32 | //#include "PseudoJet.hh"
|
---|
| 33 | //#include "ClusterSequence.hh"
|
---|
| 34 |
|
---|
[19] | 35 | #include<vector>
|
---|
| 36 | #include<iostream>
|
---|
| 37 |
|
---|
[9] | 38 | using namespace std;
|
---|
| 39 |
|
---|
| 40 | //------------------------------------------------------------------------------
|
---|
| 41 |
|
---|
[39] | 42 | // //********************************** PYTHIA INFORMATION*********************************
|
---|
[26] | 43 |
|
---|
[39] | 44 | TSimpleArray<TRootGenParticle> TauHadr(const TClonesArray *GEN)
|
---|
| 45 | {
|
---|
| 46 | TIter it((TCollection*)GEN);
|
---|
| 47 | it.Reset();
|
---|
| 48 | TRootGenParticle *gen1;
|
---|
| 49 | TSimpleArray<TRootGenParticle> array,array2;
|
---|
[26] | 50 |
|
---|
[39] | 51 | while((gen1 = (TRootGenParticle*) it.Next()))
|
---|
| 52 | {
|
---|
| 53 | array.Add(gen1);
|
---|
| 54 | }
|
---|
| 55 | it.Reset();
|
---|
| 56 | bool tauhad;
|
---|
| 57 | while((gen1 = (TRootGenParticle*) it.Next()))
|
---|
| 58 | {
|
---|
| 59 | tauhad=false;
|
---|
| 60 | if(abs(gen1->PID)==15)
|
---|
| 61 | {
|
---|
| 62 | int d1=gen1->D1;
|
---|
| 63 | int d2=gen1->D2;
|
---|
| 64 | if((d1 < array.GetEntries()) && (d1 > 0) && (d2 < array.GetEntries()) && (d2 > 0))
|
---|
| 65 | {
|
---|
| 66 | tauhad=true;
|
---|
| 67 | for(int d=d1; d < d2+1; d++)
|
---|
[264] | 68 | {
|
---|
[39] | 69 | if(abs(array[d]->PID)== pE || abs(array[d]->PID)== pMU)tauhad=false;
|
---|
| 70 | }
|
---|
| 71 | }
|
---|
| 72 | }
|
---|
| 73 | if(tauhad)array2.Add(gen1);
|
---|
| 74 | }
|
---|
| 75 | return array2;
|
---|
| 76 | }
|
---|
| 77 |
|
---|
[258] | 78 | double EnergySmallCone(const vector<TLorentzVector> &towers, const float eta, const float phi,float energy_scone,float JET_seed) {
|
---|
| 79 | double Energie=0;
|
---|
| 80 | for(unsigned int i=0; i < towers.size(); i++) {
|
---|
| 81 | if(towers[i].Pt() < JET_seed) continue;
|
---|
| 82 | if((DeltaR(phi,eta,towers[i].Phi(),towers[i].Eta()) < energy_scone)) {
|
---|
| 83 | Energie += towers[i].E();
|
---|
| 84 | }
|
---|
| 85 | }
|
---|
| 86 | return Energie;
|
---|
| 87 | }
|
---|
[39] | 88 |
|
---|
| 89 |
|
---|
[258] | 90 | void PairingJet(TLorentzVector &JETSm, const TLorentzVector &JET, const TClonesArray *branchJet)
|
---|
[9] | 91 | {
|
---|
| 92 | JETSm.SetPxPyPzE(0,0,0,0);
|
---|
| 93 | float deltaRtest=5000;
|
---|
[258] | 94 | TIter itJet((TCollection*)branchJet);
|
---|
| 95 | TRootJet *jet;
|
---|
| 96 | itJet.Reset();
|
---|
| 97 | while( (jet = (TRootJet*) itJet.Next()) )
|
---|
| 98 | {
|
---|
[19] | 99 | TLorentzVector Att;
|
---|
[264] | 100 | Att.SetPtEtaPhiE(jet->PT,jet->Eta,jet->Phi,jet->E);
|
---|
[19] | 101 | if(DeltaR(JET.Phi(),JET.Eta(),Att.Phi(),Att.Eta()) < deltaRtest)
|
---|
| 102 | {
|
---|
| 103 | deltaRtest = DeltaR(JET.Phi(),JET.Eta(),Att.Phi(),Att.Eta());
|
---|
| 104 | if(deltaRtest < 0.25)
|
---|
| 105 | {
|
---|
| 106 | JETSm = Att;
|
---|
| 107 | }
|
---|
| 108 | }
|
---|
| 109 | }
|
---|
[9] | 110 | }
|
---|
| 111 |
|
---|
[258] | 112 | void PairingElec(TLorentzVector &ELECSm, const TLorentzVector &ELEC, const TClonesArray *branchElec)
|
---|
| 113 | {
|
---|
| 114 | ELECSm.SetPxPyPzE(0,0,0,0);
|
---|
| 115 | float deltaRtest=5000;
|
---|
| 116 | TIter itElec((TCollection*)branchElec);
|
---|
| 117 | TRootElectron *elec;
|
---|
| 118 | itElec.Reset();
|
---|
| 119 | while( (elec = (TRootElectron*) itElec.Next()) )
|
---|
| 120 | {
|
---|
| 121 | TLorentzVector Att;
|
---|
[264] | 122 | Att.SetPtEtaPhiE(elec->PT,elec->Eta,elec->Phi,elec->E);
|
---|
[258] | 123 | if(DeltaR(ELEC.Phi(),ELEC.Eta(),Att.Phi(),Att.Eta()) < deltaRtest)
|
---|
| 124 | {
|
---|
| 125 | deltaRtest = DeltaR(ELEC.Phi(),ELEC.Eta(),Att.Phi(),Att.Eta());
|
---|
| 126 | if(deltaRtest < 0.025)
|
---|
| 127 | {
|
---|
| 128 | ELECSm = Att;
|
---|
| 129 | }
|
---|
| 130 | }
|
---|
| 131 | }
|
---|
| 132 | }
|
---|
| 133 |
|
---|
| 134 | void PairingMuon(TLorentzVector &MUONSm, const TLorentzVector &MUON, const TClonesArray *branchMuon)
|
---|
| 135 | {
|
---|
| 136 | MUONSm.SetPxPyPzE(0,0,0,0);
|
---|
| 137 | float deltaRtest=5000;
|
---|
| 138 | TIter itMuon((TCollection*)branchMuon);
|
---|
| 139 | TRootMuon *muon;
|
---|
| 140 | itMuon.Reset();
|
---|
| 141 | while( (muon = (TRootMuon*) itMuon.Next()) )
|
---|
| 142 | {
|
---|
| 143 | TLorentzVector Att;
|
---|
| 144 | Att.SetPxPyPzE(muon->Px,muon->Py,muon->Pz,muon->E);
|
---|
| 145 | if(DeltaR(MUON.Phi(),MUON.Eta(),Att.Phi(),Att.Eta()) < deltaRtest)
|
---|
| 146 | {
|
---|
| 147 | deltaRtest = DeltaR(MUON.Phi(),MUON.Eta(),Att.Phi(),Att.Eta());
|
---|
| 148 | if(deltaRtest < 0.025)
|
---|
| 149 | {
|
---|
| 150 | MUONSm = Att;
|
---|
| 151 | }
|
---|
| 152 | }
|
---|
| 153 | }
|
---|
| 154 | }
|
---|
| 155 |
|
---|
| 156 | unsigned int NumTracks(const TClonesArray *branchTracks, const float pt_track, const float eta, const float phi,float track_scone) {
|
---|
| 157 | unsigned int numtrack=0;
|
---|
| 158 | TIter itTrack((TCollection*)branchTracks);
|
---|
| 159 | TRootTracks *track;
|
---|
| 160 | itTrack.Reset();
|
---|
| 161 | while( (track = (TRootTracks*) itTrack.Next()) )
|
---|
| 162 | {
|
---|
| 163 | if((track->PT < pt_track )||
|
---|
| 164 | (DeltaR(phi,eta,track->Phi,track->Eta) > track_scone)
|
---|
| 165 | )continue;
|
---|
| 166 | numtrack++;
|
---|
| 167 | }
|
---|
| 168 | return numtrack;
|
---|
| 169 | }
|
---|
| 170 |
|
---|
| 171 |
|
---|
| 172 |
|
---|
[9] | 173 | int main(int argc, char *argv[])
|
---|
| 174 | {
|
---|
| 175 | int appargc = 2;
|
---|
[258] | 176 | char *appName = "Resolution";
|
---|
[9] | 177 | char *appargv[] = {appName, "-b"};
|
---|
| 178 | TApplication app(appName, &appargc, appargv);
|
---|
| 179 |
|
---|
[258] | 180 | if(argc != 3) {
|
---|
| 181 | cout << " Usage: " << argv[0] << " input_file" << " output_file" << endl;
|
---|
| 182 | cout << " input_list - list of files in root format," << endl;
|
---|
[9] | 183 | cout << " output_file - output file." << endl;
|
---|
| 184 | exit(1);
|
---|
| 185 | }
|
---|
| 186 |
|
---|
| 187 | srand (time (NULL)); /* Initialisation du générateur */
|
---|
| 188 |
|
---|
| 189 | //read the input TROOT file
|
---|
[258] | 190 | string inputfilename(argv[1]), outputfilename(argv[2]);
|
---|
| 191 |
|
---|
[9] | 192 | if(outputfilename.find(".root") > outputfilename.length() ) {
|
---|
| 193 | cout << "output_file should be a .root file!\n";
|
---|
| 194 | return -1;
|
---|
| 195 | }
|
---|
[88] | 196 |
|
---|
[258] | 197 |
|
---|
| 198 |
|
---|
[9] | 199 | TFile *outputFile = TFile::Open(outputfilename.c_str(), "RECREATE"); // Creates the file, but should be closed just after
|
---|
| 200 | outputFile->Close();
|
---|
[26] | 201 |
|
---|
[258] | 202 | TChain chainGEN("GEN");
|
---|
| 203 | chainGEN.Add(inputfilename.c_str());
|
---|
| 204 | ExRootTreeReader *treeReaderGEN = new ExRootTreeReader(&chainGEN);
|
---|
| 205 | TChain chain("Analysis");
|
---|
| 206 | chain.Add(inputfilename.c_str());
|
---|
[9] | 207 | ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
|
---|
[258] | 208 | const TClonesArray *branchJet = treeReader->UseBranch("Jet");
|
---|
| 209 | const TClonesArray *branchElec = treeReader->UseBranch("Electron");
|
---|
| 210 | const TClonesArray *branchMuon = treeReader->UseBranch("Muon");
|
---|
| 211 | const TClonesArray *branchTracks = treeReader->UseBranch("Tracks");
|
---|
| 212 | const TClonesArray *branchTowers = treeReader->UseBranch("CaloTower");
|
---|
| 213 | const TClonesArray *branchGen = treeReaderGEN->UseBranch("Particle");
|
---|
[9] | 214 | TIter itGen((TCollection*)branchGen);
|
---|
| 215 |
|
---|
| 216 | //write the output root file
|
---|
| 217 | ExRootTreeWriter *treeWriter = new ExRootTreeWriter(outputfilename, "Analysis");
|
---|
| 218 | ExRootTreeBranch *branchjet = treeWriter->NewBranch("JetPTResol", RESOLJET::Class());
|
---|
| 219 | ExRootTreeBranch *branchelec = treeWriter->NewBranch("ElecEResol", RESOLELEC::Class());
|
---|
| 220 | ExRootTreeBranch *branchmuon = treeWriter->NewBranch("MuonPTResol", RESOLMUON::Class());
|
---|
| 221 | ExRootTreeBranch *branchtaujet = treeWriter->NewBranch("TauJetPTResol", TAUHAD::Class());
|
---|
| 222 | ExRootTreeBranch *branchetmis = treeWriter->NewBranch("ETmisResol",ETMIS::Class());
|
---|
[26] | 223 |
|
---|
[9] | 224 | TRootGenParticle *particle;
|
---|
[26] | 225 |
|
---|
[39] | 226 | RESOLELEC * elementElec;
|
---|
[9] | 227 | RESOLMUON *elementMuon;
|
---|
| 228 | RESOLJET *elementJet;
|
---|
| 229 | TAUHAD *elementTaujet;
|
---|
| 230 | ETMIS *elementEtmis;
|
---|
[26] | 231 |
|
---|
[258] | 232 | int numTau=0;
|
---|
| 233 | int numTauRec=0;
|
---|
[26] | 234 |
|
---|
[258] | 235 | RESOLution *DET = new RESOLution();
|
---|
| 236 | DET->ReadDataCard("data/Datacard_CMS.dat");
|
---|
[88] | 237 |
|
---|
[258] | 238 |
|
---|
[88] | 239 | //Jet information
|
---|
[258] | 240 | JetsUtil *JETRUN = new JetsUtil("data/Datacard_CMS.dat");
|
---|
[88] | 241 |
|
---|
| 242 | TLorentzVector genMomentum(0,0,0,0);//TLorentzVector containing generator level information
|
---|
[258] | 243 | TLorentzVector recoMomentum(0,0,0,0);//TLorentzVector containing generator level information
|
---|
[9] | 244 | LorentzVector jetMomentum;
|
---|
[26] | 245 |
|
---|
[88] | 246 | vector<fastjet::PseudoJet> input_particlesGEN;//for FastJet algorithm
|
---|
| 247 | vector<fastjet::PseudoJet> sorted_jetsGEN;
|
---|
[26] | 248 |
|
---|
[258] | 249 | vector<TLorentzVector> towers;
|
---|
[152] | 250 |
|
---|
[9] | 251 | // Loop over all events
|
---|
| 252 | Long64_t entry, allEntries = treeReader->GetEntries();
|
---|
| 253 | cout << "** Chain contains " << allEntries << " events" << endl;
|
---|
| 254 | for(entry = 0; entry < allEntries; ++entry)
|
---|
| 255 | {
|
---|
[88] | 256 | TLorentzVector PTmisReco(0,0,0,0);
|
---|
| 257 | TLorentzVector PTmisGEN(0,0,0,0);
|
---|
[9] | 258 | treeReader->ReadEntry(entry);
|
---|
[258] | 259 | treeReaderGEN->ReadEntry(entry);
|
---|
[9] | 260 | treeWriter->Clear();
|
---|
| 261 | if((entry % 100) == 0 && entry > 0 ) cout << "** Processing element # " << entry << endl;
|
---|
| 262 |
|
---|
| 263 | TSimpleArray<TRootGenParticle> bGen;
|
---|
| 264 | itGen.Reset();
|
---|
| 265 | TSimpleArray<TRootGenParticle> NFCentralQ;
|
---|
[89] | 266 |
|
---|
[88] | 267 | input_particlesGEN.clear();
|
---|
[23] | 268 | towers.clear();
|
---|
[26] | 269 |
|
---|
[9] | 270 | // Loop over all particles in event
|
---|
| 271 | while( (particle = (TRootGenParticle*) itGen.Next()) )
|
---|
| 272 | {
|
---|
| 273 | genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
|
---|
[26] | 274 |
|
---|
[9] | 275 | int pid = abs(particle->PID);
|
---|
| 276 | float eta = fabs(particle->Eta);
|
---|
[89] | 277 |
|
---|
[88] | 278 | //input generator level particle for jet algorithm
|
---|
[94] | 279 | if(particle->Status == 1 && eta < DET->CEN_max_calo_fwd)
|
---|
[26] | 280 | {
|
---|
[88] | 281 | input_particlesGEN.push_back(fastjet::PseudoJet(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
|
---|
[26] | 282 | }
|
---|
[89] | 283 |
|
---|
[88] | 284 | //Calculate ETMIS from generated particles
|
---|
| 285 | if((pid == pNU1) || (pid == pNU2) || (pid == pNU3))PTmisGEN = PTmisGEN + genMomentum;
|
---|
[258] | 286 |
|
---|
| 287 | if( (particle->Status == 1) &&
|
---|
| 288 | ((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&
|
---|
| 289 | (fabs(particle->Eta) < DET->CEN_max_calo_fwd)
|
---|
| 290 | )
|
---|
[88] | 291 | {
|
---|
[258] | 292 | eta=fabs(genMomentum.Eta());
|
---|
[152] | 293 |
|
---|
[258] | 294 | switch(pid) {
|
---|
| 295 |
|
---|
| 296 | case pE: // all electrons with eta < DET->MAX_CALO_FWD
|
---|
| 297 | PairingElec(recoMomentum,genMomentum,branchElec);
|
---|
[264] | 298 | if(recoMomentum.E()!=0){
|
---|
[258] | 299 | elementElec=(RESOLELEC*) branchelec->NewEntry();
|
---|
| 300 | elementElec->E = genMomentum.E();
|
---|
| 301 | elementElec->SmearedE = recoMomentum.E();}
|
---|
| 302 | break; // case pE
|
---|
| 303 | case pMU: // all muons with eta < DET->MAX_MU
|
---|
| 304 | PairingMuon(recoMomentum,genMomentum,branchMuon);
|
---|
| 305 | if(recoMomentum.E() !=0){
|
---|
| 306 | elementMuon = (RESOLMUON*) branchmuon->NewEntry();
|
---|
| 307 | elementMuon->OverPT = (1/genMomentum.Pt());
|
---|
| 308 | elementMuon->OverSmearedPT = (1/recoMomentum.Pt());}
|
---|
| 309 | break; // case pMU
|
---|
| 310 | default:
|
---|
| 311 | break;
|
---|
| 312 | } // switch (pid)
|
---|
| 313 | }
|
---|
| 314 |
|
---|
[9] | 315 | } // while
|
---|
[264] | 316 |
|
---|
[89] | 317 | //compute missing transverse energy from calo towers
|
---|
[258] | 318 | TIter itCalo((TCollection*)branchTowers);
|
---|
| 319 | TRootCalo *calo;
|
---|
| 320 | itCalo.Reset();
|
---|
[89] | 321 | TLorentzVector Att(0.,0.,0.,0.);
|
---|
| 322 | float ScalarEt=0;
|
---|
[258] | 323 | while( (calo = (TRootCalo*) itCalo.Next()) )
|
---|
| 324 | {
|
---|
[264] | 325 | if(calo->E !=0){
|
---|
| 326 | Att.SetPtEtaPhiE(calo->getET(),calo->Eta,calo->Phi,calo->E);
|
---|
| 327 | towers.push_back(Att);
|
---|
| 328 | if(fabs(Att.Eta()) < DET->CEN_max_calo_fwd)
|
---|
| 329 | {
|
---|
| 330 | ScalarEt = ScalarEt + calo->getET();
|
---|
| 331 | PTmisReco = PTmisReco + Att;
|
---|
| 332 | }
|
---|
| 333 | }
|
---|
| 334 | }
|
---|
[89] | 335 | elementEtmis= (ETMIS*) branchetmis->NewEntry();
|
---|
| 336 | elementEtmis->Et = (PTmisGEN).Pt();
|
---|
| 337 | elementEtmis->Ex = (-PTmisGEN).Px();
|
---|
| 338 | elementEtmis->SEt = ScalarEt;
|
---|
[88] | 339 |
|
---|
[89] | 340 | elementEtmis->EtSmeare = (PTmisReco).Pt()-(PTmisGEN).Pt();
|
---|
| 341 | elementEtmis->ExSmeare = (-PTmisReco).Px()-(PTmisGEN).Px();
|
---|
[9] | 342 |
|
---|
| 343 | //*****************************
|
---|
[26] | 344 |
|
---|
[88] | 345 | sorted_jetsGEN=JETRUN->RunJets(input_particlesGEN);
|
---|
| 346 |
|
---|
[39] | 347 | TSimpleArray<TRootGenParticle> TausHadr = TauHadr(branchGen);
|
---|
| 348 |
|
---|
[88] | 349 | TLorentzVector JETreco(0,0,0,0);
|
---|
| 350 | for (unsigned int i = 0; i < sorted_jetsGEN.size(); i++) {
|
---|
| 351 | TLorentzVector JETgen(0,0,0,0);
|
---|
| 352 | JETgen.SetPxPyPzE(sorted_jetsGEN[i].px(),sorted_jetsGEN[i].py(),sorted_jetsGEN[i].pz(),sorted_jetsGEN[i].E());
|
---|
[258] | 353 | PairingJet(JETreco,JETgen,branchJet);
|
---|
[88] | 354 | if(JETreco.Pt()>1)
|
---|
[19] | 355 | {
|
---|
| 356 | elementJet= (RESOLJET*) branchjet->NewEntry();
|
---|
[88] | 357 | elementJet->PT = JETgen.Et();
|
---|
| 358 | elementJet->SmearedPT = JETreco.Et()/JETgen.Et();
|
---|
[19] | 359 | }
|
---|
[39] | 360 | }
|
---|
[152] | 361 | numTau = numTau+TausHadr.GetEntries();
|
---|
[258] | 362 |
|
---|
| 363 | TIter itJet((TCollection*)branchJet);
|
---|
| 364 | TRootJet *jet;
|
---|
| 365 | itJet.Reset();
|
---|
| 366 | while( (jet = (TRootJet*) itJet.Next()) )
|
---|
| 367 | {
|
---|
| 368 | TLorentzVector JETT(0,0,0,0);
|
---|
| 369 | JETT.SetPxPyPzE(jet->Px,jet->Py,jet->Pz,jet->E);
|
---|
| 370 | if(fabs(JETT.Eta()) < (DET->CEN_max_tracker - DET->TAU_track_scone))
|
---|
[39] | 371 | {
|
---|
| 372 | for(Int_t i=0; i<TausHadr.GetEntries();i++)
|
---|
| 373 | {
|
---|
| 374 | if(DeltaR(TausHadr[i]->Phi,TausHadr[i]->Eta,JETT.Phi(),JETT.Eta())<0.1)
|
---|
| 375 | {
|
---|
| 376 | elementTaujet= (TAUHAD*) branchtaujet->NewEntry();
|
---|
[258] | 377 | elementTaujet->EnergieCen = (EnergySmallCone(towers,JETT.Eta(),JETT.Phi(),DET->TAU_energy_scone,DET->JET_seed)/JETT.E());
|
---|
| 378 | elementTaujet->NumTrack = NumTracks(branchTracks,DET->TAU_track_pt,JETT.Eta(),JETT.Phi(),DET->TAU_track_scone);
|
---|
| 379 | if( (EnergySmallCone(towers,JETT.Eta(),JETT.Phi(),DET->TAU_energy_scone,DET->JET_seed)/JETT.E()) > 0.95
|
---|
| 380 | && (NumTracks(branchTracks,DET->TAU_track_pt,JETT.Eta(),JETT.Phi(),DET->TAU_track_scone))==1)numTauRec++;
|
---|
[39] | 381 | }
|
---|
| 382 | }
|
---|
| 383 | }
|
---|
| 384 |
|
---|
[26] | 385 |
|
---|
| 386 | } // for itJet : loop on all jets
|
---|
[264] | 387 | //cout<<"i"<<endl;
|
---|
[26] | 388 |
|
---|
[9] | 389 | treeWriter->Fill();
|
---|
| 390 | } // Loop over all events
|
---|
| 391 | treeWriter->Write();
|
---|
[264] | 392 | float frac = numTauRec/numTau;
|
---|
| 393 | cout<<numTauRec<<endl;
|
---|
| 394 | cout<<numTau<<endl;
|
---|
[152] | 395 |
|
---|
[9] | 396 | cout << "** Exiting..." << endl;
|
---|
[152] | 397 | cout<<frac<<endl;
|
---|
| 398 |
|
---|
[9] | 399 |
|
---|
| 400 | delete treeWriter;
|
---|
| 401 | delete treeReader;
|
---|
| 402 | delete DET;
|
---|
| 403 | }
|
---|
| 404 |
|
---|