Changeset 313 in svn
- Timestamp:
- Mar 10, 2009, 12:57:20 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r312 r313 158 158 159 159 srand (time (NULL)); /* Initialisation du générateur */ 160 TStopwatch globalwatch, loopwatch, triggerwatch, frogwatch ;160 TStopwatch globalwatch, loopwatch, triggerwatch, frogwatch, lhcowatch; 161 161 globalwatch.Start(); 162 162 … … 716 716 FROG->BuildGeom(); 717 717 delete FROG; 718 cout <<"** Exiting FROG preparation... **"<< endl; 718 719 } 719 720 frogwatch.Stop(); 720 721 721 722 // 3.3 *************** LHCO output 723 lhcowatch.Start(); 722 724 if(DET->FLAG_lhco == 1){ 723 725 cout <<"** **"<<endl; 724 726 cout <<"** ############ Start LHCO convertion ############ **"<< endl; 725 /*726 //create output log-file name727 string forLogLHCO = outputfilename;728 string LogNameLHCO = forLogLHCO.erase(forLogLHCO.find(".root"));729 LogNameLHCO = LogNameLHCO+"_events.lhco";730 */731 727 732 728 //LHCOConverter *LHCO = new LHCOConverter(outputfilename,LogNameLHCO); … … 735 731 LHCO->ConvertExRootAnalysisToLHCO(); 736 732 delete LHCO; 733 cout <<"** Exiting LHCO converstion... **"<< endl; 737 734 } 735 lhcowatch.Stop(); 738 736 739 737 … … 778 776 << right << setw(15) <<frogwatch.RealTime()<<"" 779 777 << right << setw(14) <<"**"<<endl; 780 781 } 778 } 779 if(DET->FLAG_lhco == 1) 780 { 781 cout << left << setw(10) <<"**"<<"" 782 << left << setw(15) <<" + LHCO:"<<"" 783 << right << setw(15) <<lhcowatch.CpuTime()<<"" 784 << right << setw(15) <<lhcowatch.RealTime()<<"" 785 << right << setw(14) <<"**"<<endl; 786 } 787 782 788 783 789 cout <<"** **"<< endl; -
trunk/interface/LHCOConverter.h
r288 r313 55 55 //ostringstream BranchReader(const TClonesArray*, unsigned int&, unsigned short int ) const; // put it as a operator<< 56 56 void BranchReader(const TClonesArray*, unsigned int&, unsigned short int ) const; 57 void BranchReaderETmis(const TClonesArray* branch, unsigned int& line) const; 57 58 const string inputfilename_; 58 59 string inputlogname_; -
trunk/src/LHCOConverter.cc
r310 r313 63 63 const unsigned int r_find = outputfilename_.rfind(".root"); 64 64 if(r_find > outputfilename_.size()) { 65 c out<< "ERROR: the extension of the input file is not '.root'. Exiting...\n"; valid_=false;65 cerr << "ERROR: the extension of the input file is not '.root'. Exiting...\n"; valid_=false; 66 66 } 67 67 else { … … 69 69 ofstream outfile( outputfilename_.c_str()); 70 70 outfile.close(); 71 cout << "INFO: " << outputfilename_ << " has been created\n"; 71 cout << left << setw(20) <<"** INFO: "<<"" 72 << left << setw(29) << outputfilename_ <<"" 73 << right << setw(20) <<"created **"<<endl; 74 72 75 } 73 76 } … … 127 130 128 131 Long64_t Nevents = analysisTree->GetEntries(); 129 cout << "** TTree 'Analysis' contains " << Nevents << " events" << endl;130 132 Nevents = min(Nevents,triggerTree->GetEntries()); 131 133 if (Nevents != analysisTree->GetEntries()) … … 155 157 156 158 // 6 MET 157 BranchReader (branchETmis,line,lhcoETmisID);159 BranchReaderETmis(branchETmis,line); 158 160 159 161 } // event loop … … 173 175 for (unsigned int i=0; i< branch_size; i++) { 174 176 particle = (TRootParticle*) branch->At(i); 175 double temp = sqrt(particle->PT*particle->PT + particle->Pz * particle->Pz);176 177 TLorentzVector pmu; 177 178 pmu.SetPtEtaPhiE(particle->PT, particle->Eta, particle->Phi, particle->E); … … 217 218 // return outfile; 218 219 } 220 221 //ostringstream LHCOConverter::BranchReader(const TClonesArray* branch, unsigned int& line, unsigned short int lhcoID) const { 222 void LHCOConverter::BranchReaderETmis(const TClonesArray* branch, unsigned int& line) const { 223 //ostringstream outfile; 224 ofstream outfile( outputfilename_.c_str(),ios_base::app); 225 TRootETmis * particle = 0; 226 particle = (TRootETmis*) branch->At(0); 227 outfile << fixed << setprecision(3) 228 << setw(3) << line++ // line counter 229 << setw(4) << 6 << " " // object ID in lhco format 230 << setw(7) << 0.000 <<" " 231 << setw(7) << particle->Phi <<" " 232 << setw(7) << particle->ET <<" " 233 << setw(7) << 0. <<" " // invariant mass 234 << setw(7) << 0 <<" " // number of tracks 235 << setw(7) << 0. <<" " 236 << setw(7) << 0. <<" " // E_had/E_em 237 << setw(7) << 0.0 << setw(7) << 0.0 // dummy/dummy 238 << endl; 239 240 outfile.close(); 241 // return outfile; 242 } 243 244
Note:
See TracChangeset
for help on using the changeset viewer.