CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DQM/L1TMonitor/src/L1TDTTF.cc

Go to the documentation of this file.
00001 /*
00002  * \file L1TDTTF.cc
00003  *
00004  * $Date: 2010/11/02 13:58:20 $
00005  * $Revision: 1.28 $
00006  * \author J. Berryhill
00007  *
00008  * $Log: L1TDTTF.cc,v $
00009  * Revision 1.28  2010/11/02 13:58:20  gcodispo
00010  * Added protection against missing products
00011  *
00012  * Revision 1.27  2010/11/01 11:27:53  gcodispo
00013  * Cleaned up 2nd track sections
00014  *
00015  * Revision 1.26  2010/10/27 13:59:25  gcodispo
00016  * Changed name to 2nd track quality (same convention as for all tracks)
00017  *
00018  * Revision 1.25  2010/10/27 13:37:08  gcodispo
00019  * Changed name to 2nd track quality (same convention as for all tracks)
00020  *
00021  * Revision 1.24  2010/10/27 08:08:52  gcodispo
00022  * Graphic improvements (names, titles, labels...)
00023  *
00024  * Revision 1.23  2010/10/19 12:14:56  gcodispo
00025  * New DTTF DQM version
00026  * - added L1TDTTFClient in order to use proper normalization
00027  * - cleaned up most of the code, removed useless plots
00028  * - reduced overall number of bins from 118325 to 104763 plus saved 1920 bins from wrongly called L1TDTTPGClient
00029  * - added match with GMT inputremoved useless plots
00030  * - added eta fine fraction plots
00031  * - added quality distribution plots
00032  *
00033  * Revision 1.22  2009/11/19 15:09:18  puigh
00034  * modify beginJob
00035  *
00036  * Revision 1.21  2009/10/12 10:16:42  nuno
00037  * bug fix; letting the package compile again
00038  *
00039  * Revision 1.20  2009/08/03 21:11:22  lorenzo
00040  * added dttf phi and theta
00041  *
00042  * Revision 1.19  2008/07/29 14:18:27  wteo
00043  * updated and added more MEs
00044  *
00045  * Revision 1.15  2008/06/10 18:01:55  lorenzo
00046  * reduced n histos
00047  *
00048  * Revision 1.14  2008/05/09 16:42:27  ameyer
00049  * *** empty log message ***
00050  *
00051  * Revision 1.13  2008/04/30 08:44:21  lorenzo
00052  * new dttf source, not based on gmt record
00053  *
00054  * Revision 1.20  2008/03/20 19:38:25  berryhil
00055  *
00056  *
00057  * organized message logger
00058  *
00059  * Revision 1.19  2008/03/14 20:35:46  berryhil
00060  *
00061  *
00062  * stripped out obsolete parameter settings
00063  *
00064  * rpc tpg restored with correct dn access and dbe handling
00065  *
00066  * Revision 1.18  2008/03/12 17:24:24  berryhil
00067  *
00068  *
00069  * eliminated log files, truncated HCALTPGXana histo output
00070  *
00071  * Revision 1.17  2008/03/10 09:29:52  lorenzo
00072  * added MEs
00073  *
00074  * Revision 1.16  2008/03/01 00:40:00  lat
00075  * DQM core migration.
00076  *
00077  * $Log: L1TDTTF.cc,v $
00078  * Revision 1.28  2010/11/02 13:58:20  gcodispo
00079  * Added protection against missing products
00080  *
00081  * Revision 1.27  2010/11/01 11:27:53  gcodispo
00082  * Cleaned up 2nd track sections
00083  *
00084  * Revision 1.26  2010/10/27 13:59:25  gcodispo
00085  * Changed name to 2nd track quality (same convention as for all tracks)
00086  *
00087  * Revision 1.25  2010/10/27 13:37:08  gcodispo
00088  * Changed name to 2nd track quality (same convention as for all tracks)
00089  *
00090  * Revision 1.24  2010/10/27 08:08:52  gcodispo
00091  * Graphic improvements (names, titles, labels...)
00092  *
00093  * Revision 1.23  2010/10/19 12:14:56  gcodispo
00094  * New DTTF DQM version
00095  * - added L1TDTTFClient in order to use proper normalization
00096  * - cleaned up most of the code, removed useless plots
00097  * - reduced overall number of bins from 118325 to 104763 plus saved 1920 bins from wrongly called L1TDTTPGClient
00098  * - added match with GMT inputremoved useless plots
00099  * - added eta fine fraction plots
00100  * - added quality distribution plots
00101  *
00102  * Revision 1.22  2009/11/19 15:09:18  puigh
00103  * modify beginJob
00104  *
00105  * Revision 1.21  2009/10/12 10:16:42  nuno
00106  * bug fix; letting the package compile again
00107  *
00108  * Revision 1.20  2009/08/03 21:11:22  lorenzo
00109  * added dttf phi and theta
00110  *
00111  * Revision 1.19  2008/07/29 14:18:27  wteo
00112  * updated and added more MEs
00113  *
00114  * Revision 1.15  2008/06/10 18:01:55  lorenzo
00115  * reduced n histos
00116  *
00117  * Revision 1.14  2008/05/09 16:42:27  ameyer
00118  * *** empty log message ***
00119  *
00120  * Revision 1.13  2008/04/30 08:44:21  lorenzo
00121  * new dttf source, not based on gmt record
00122  *
00123  * Revision 1.20  2008/03/20 19:38:25  berryhil
00124  *
00125  *
00126  * organized message logger
00127  *
00128  * Revision 1.19  2008/03/14 20:35:46  berryhil
00129  *
00130  *
00131  * stripped out obsolete parameter settings
00132  *
00133  * rpc tpg restored with correct dn access and dbe handling
00134  *
00135  * Revision 1.18  2008/03/12 17:24:24  berryhil
00136  *
00137  *
00138  * eliminated log files, truncated HCALTPGXana histo output
00139  *
00140  * Revision 1.17  2008/03/10 09:29:52  lorenzo
00141  * added MEs
00142  *
00143  * Revision 1.15  2008/01/22 18:56:01  muzaffar
00144  * include cleanup. Only for cc/cpp files
00145  *
00146  * Revision 1.14  2007/12/21 17:41:20  berryhil
00147  *
00148  *
00149  * try/catch removal
00150  *
00151  * Revision 1.13  2007/11/19 15:08:22  lorenzo
00152  * changed top folder name
00153  *
00154  * Revision 1.12  2007/08/15 18:56:25  berryhil
00155  *
00156  *
00157  * split histograms by bx; add Maiken's bx classifier plots
00158  *
00159  * Revision 1.11  2007/07/26 09:37:09  berryhil
00160  *
00161  *
00162  * set verbose false for all modules
00163  * set verbose fix for DTTPG tracks
00164  *
00165  * Revision 1.10  2007/07/25 09:03:58  berryhil
00166  *
00167  *
00168  * conform to DTTFFEDReader input tag.... for now
00169  *
00170  * Revision 1.9  2007/07/12 16:06:18  wittich
00171  * add simple phi output track histograms.
00172  * note that the label of this class is different than others
00173  * from the DTFFReader creates.
00174  *
00175  */
00176 
00177 #include "DQM/L1TMonitor/interface/L1TDTTF.h"
00178 
00180 #include "FWCore/ServiceRegistry/interface/Service.h"
00181 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00182 #include "DQMServices/Core/interface/DQMStore.h"
00183 #include "DQMServices/Core/interface/MonitorElement.h"
00184 
00186 // #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
00187 // #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhDigi.h"
00188 // #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
00189 // #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThDigi.h"
00190 
00192 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h"
00193 
00195 #include "DataFormats/L1GlobalMuonTrigger/interface/L1MuGMTReadoutCollection.h"
00196 
00197 
00199 #include "DataFormats/MuonReco/interface/Muon.h"
00200 #include "DataFormats/MuonReco/interface/MuonFwd.h"
00201 
00202 
00203 
00204 //--------------------------------------------------------
00205 L1TDTTF::L1TDTTF(const edm::ParameterSet& ps)
00206   : dttpgSource_( ps.getParameter< edm::InputTag >("dttpgSource") ),
00207     gmtSource_( ps.getParameter< edm::InputTag >("gmtSource") ),
00208     muonCollectionLabel_( ps.getParameter<edm::InputTag>("MuonCollection") ),
00209     l1tsubsystemfolder_( ps.getUntrackedParameter<std::string>("l1tSystemFolder",
00210                                                                "L1T/L1TDTTF")),
00211     online_( ps.getUntrackedParameter<bool>("online", true) ),
00212     verbose_( ps.getUntrackedParameter<bool>("verbose", false) )
00213 
00214 {
00215 
00216   std::string trstring =
00217     dttpgSource_.label() + ":DATA:" + dttpgSource_.process();
00218   trackInputTag_ = edm::InputTag(trstring);
00219 
00221   if ( verbose_ ) edm::LogInfo("L1TDTTF: constructor") << "Verbose enabled";
00222 
00224   dbe_ = NULL;
00225   if ( ps.getUntrackedParameter<bool>("DQMStore", false) ) {
00226     dbe_ = edm::Service<DQMStore>().operator->();
00227     dbe_->setVerbose(0);
00228     dbe_->setCurrentFolder(l1tsubsystemfolder_);
00229   }
00230 
00232   if ( ps.getUntrackedParameter<bool>("disableROOToutput", false) ) {
00233 
00234     outputFile_ = "";
00235 
00236   } else {
00237 
00238     outputFile_ = ps.getUntrackedParameter<std::string>("outputFile", "");
00239     if ( ! outputFile_.empty() ) {
00240       edm::LogInfo("L1TDTTF: constructor")
00241         << "L1T Monitoring histograms will be saved to " << outputFile_;
00242     }
00243 
00244   }
00245 
00246 }
00247 
00248 
00249 
00250 //--------------------------------------------------------
00251 L1TDTTF::~L1TDTTF()
00252 {
00254 }
00255 
00256 
00257 
00258 //--------------------------------------------------------
00259 void L1TDTTF::beginJob(void)
00260 {
00262   nev_ = 0;
00263   nev_dttf_ = 0;
00264   nev_dttf_track2_ = 0;
00265 
00266   // get hold of back-end interface
00267 
00268   if ( dbe_ ) {
00269 
00270     std::string dttf_trk_folder = l1tsubsystemfolder_;
00271 
00272     char hname[100]; 
00273     char htitle[100]; 
00274 
00276     float start = 0;
00277     float stop = 0;
00278     int nbins = 0;
00280 
00282     dbe_->setCurrentFolder(dttf_trk_folder);
00283 
00284     std::string wheelpath[6] = { "/02-WHEEL_N2",
00285                                  "/03-WHEEL_N1",
00286                                  "/04-WHEEL_N0",
00287                                  "/05-WHEEL_P0",
00288                                  "/06-WHEEL_P1",
00289                                  "/07-WHEEL_P2" };
00290 
00291 
00292     char c_whn[6][3] = { "N2", "N1", "N0", "P0", "P1", "P2" };
00293     // char bxn [3][3] = { "N1", "0", "P1" };
00294     // char bxn[3][25] = {"/BX_NONZERO_ONLY/BX_N1", "", "/BX_NONZERO_ONLY/BX_P1"};
00295 
00296     for ( int iwh = 0; iwh < 6; ++iwh ) {
00297 
00298       bookEta( iwh, nbins, start, stop ); 
00299 
00303       std::string dttf_trk_folder_wheel = dttf_trk_folder + wheelpath[iwh];
00304       dbe_->setCurrentFolder(dttf_trk_folder_wheel);
00305 
00307       sprintf(hname, "dttf_01_nTracksPerEvent_wh%s", c_whn[iwh]);
00308       sprintf(htitle, "Wheel %s - Number Tracks Per Event", c_whn[iwh]);
00309       dttf_nTracksPerEvent_wheel[iwh] = dbe_->book1D(hname, htitle,
00310                                                      10, 0.5, 10.5);
00311       dttf_nTracksPerEvent_wheel[iwh]->setAxisTitle("# tracks/event", 1);
00312 
00314       sprintf(hname, "dttf_07_phi_vs_etaFine_wh%s", c_whn[iwh]);
00315       sprintf(htitle, "Wheel %s -   #eta-#phi DTTF Tracks occupancy (fine #eta only, unpacked values)", c_whn[iwh]);
00316       dttf_phi_eta_fine_wheel[iwh] = dbe_->book2D(hname, htitle,
00317                                                   nbins, start-0.5, stop-0.5,
00318                                                   144, -6, 138);
00319       // 144, -0.5, 143.5);
00320       
00321       dttf_phi_eta_fine_wheel[iwh]->setAxisTitle("#eta", 1);
00322       dttf_phi_eta_fine_wheel[iwh]->setAxisTitle("#phi", 2);
00323 
00325       sprintf(hname, "dttf_08_phi_vs_etaCoarse_wh%s", c_whn[iwh]);
00326       sprintf(htitle, "Wheel %s -   #eta-#phi DTTF Tracks occupancy (coarse #eta only, unpacked values)", c_whn[iwh]);
00327       dttf_phi_eta_coarse_wheel[iwh] = dbe_->book2D(hname, htitle,
00328                                                     nbins, start-0.5, stop-0.5,
00329                                                     144, -6, 138);
00330       // 144, -0.5, 143.5);
00331       dttf_phi_eta_coarse_wheel[iwh]->setAxisTitle("#eta", 1);
00332       dttf_phi_eta_coarse_wheel[iwh]->setAxisTitle("#phi", 2);
00333 
00336       std::string dttf_trk_folder_wheel_2ndtrack =
00337         dttf_trk_folder_wheel + "/2ND_TRACK_ONLY";
00338       dbe_->setCurrentFolder(dttf_trk_folder_wheel_2ndtrack);
00339 
00340 
00342       sprintf(hname, "dttf_04_quality_wh%s_2ndTrack", c_whn[iwh]);
00343       sprintf(htitle, "Wheel %s - 2nd Tracks Quality distribution", c_whn[iwh]);
00344       dttf_quality_wheel_2ndTrack[iwh] = dbe_->book1D(hname, htitle, 7, 1, 8);
00345       setQualLabel( dttf_quality_wheel_2ndTrack[iwh], 1);
00346 
00348       sprintf(hname, "dttf_05_quality_summary_wh%s_2ndTrack", c_whn[iwh]);
00349       sprintf(htitle, "Wheel %s - 2nd Tracks - Quality", c_whn[iwh]);
00350       dttf_quality_summary_wheel_2ndTrack[iwh] = dbe_->book2D(hname, htitle,
00351                                                       12, 1, 13, 7, 1, 8 );
00352       dttf_quality_summary_wheel_2ndTrack[iwh]->setAxisTitle("Sector", 1);
00353       setQualLabel( dttf_quality_summary_wheel_2ndTrack[iwh], 2);
00354       // dttf_quality_summary_wheel_2ndTrack[iwh]->setAxisTitle("Quality", 2);
00355 
00357       sprintf(hname, "dttf_06_phi_vs_eta_wh%s_2ndTrack", c_whn[iwh]);
00358       sprintf(htitle, "Wheel %s -   #eta-#phi Distribution of DTTF 2nd Tracks",
00359               c_whn[iwh]);
00360 
00361       dttf_phi_eta_wheel_2ndTrack[iwh] = dbe_->book2D(hname, htitle,
00362                                                       nbins, start-0.5,stop-0.5,
00363                                                       144, -6, 138);
00364       // 144, -0.5, 143.5);
00365       dttf_phi_eta_wheel_2ndTrack[iwh]->setAxisTitle("#eta", 1);
00366       dttf_phi_eta_wheel_2ndTrack[iwh]->setAxisTitle("#phi", 2);
00367 
00368 
00369 
00371       sprintf(hname, "dttf_07_eta_wh%s_2ndTrack", c_whn[iwh]);
00372       sprintf(htitle, "Wheel %s - DTTF 2nd Tracks #eta distribution (Packed values)",
00373               c_whn[iwh]);
00374       dttf_eta_wheel_2ndTrack[iwh] = dbe_->book1D(hname, htitle, 64, -0.5, 63.5);
00375       dttf_eta_wheel_2ndTrack[iwh]->setAxisTitle("#eta", 1);
00376 
00378       sprintf(hname, "dttf_08_phi_wh%s_2ndTrack", c_whn[iwh]);
00379       sprintf(htitle, "Wheel %s - DTTF 2nd Tracks Phi distribution (Packed values)",
00380               c_whn[iwh]);
00381       dttf_phi_wheel_2ndTrack[iwh] = dbe_->book1D(hname, htitle, 144, -6, 138. );
00382       dttf_phi_wheel_2ndTrack[iwh]->setAxisTitle("#phi", 1);
00383 
00385       sprintf(hname, "dttf_09_pt_wh%s_2ndTrack", c_whn[iwh]);
00386       sprintf(htitle, "Wheel %s - DTTF 2nd Tracks p_{T} distribution (Packed values)",
00387               c_whn[iwh]);
00388       dttf_pt_wheel_2ndTrack[iwh]  = dbe_->book1D(hname, htitle, 32, -0.5, 31.5);
00389       dttf_pt_wheel_2ndTrack[iwh]->setAxisTitle("p_{T}", 1);
00390 
00392       sprintf(hname, "dttf_10_charge_wh%s_2ndTrack", c_whn[iwh]);
00393       sprintf(htitle, "Wheel %s - DTTF 2nd Tracks Charge distribution", c_whn[iwh]);
00394       dttf_q_wheel_2ndTrack[iwh] = dbe_->book1D(hname, htitle, 2, -0.5, 1.5);
00395       dttf_q_wheel_2ndTrack[iwh]->setAxisTitle("Charge", 1);
00396 
00397 
00398 
00399 
00403 
00405       std::string dttf_trk_folder_nTracksPerEvent = dttf_trk_folder_wheel + "/TracksPerEvent";
00406       dbe_->setCurrentFolder(dttf_trk_folder_nTracksPerEvent);
00407 
00408       for(int ise = 0; ise < 12; ++ise) {
00409         sprintf(hname, "dttf_nTracksPerEvent_wh%s_se%d", c_whn[iwh], ise+1);
00410         sprintf(htitle, "Wheel %s Sector %d - Number of Tracks Per Event",
00411                 c_whn[iwh], ise+1);
00412         dttf_nTracksPerEv[iwh][ise] = dbe_->book1D(hname, htitle, 2, 0.5, 2.5);
00413         dttf_nTracksPerEv[iwh][ise]->setAxisTitle("# tracks/event", 1);
00414       }
00415 
00416 
00418       std::string dttf_trk_folder_wh_bxsec_all =
00419         dttf_trk_folder_wheel + "/BX_BySector";
00420       dbe_->setCurrentFolder(dttf_trk_folder_wh_bxsec_all);
00421 
00422       for(int ise = 0; ise < 12; ++ise ) {
00423         sprintf(hname, "dttf_bx_wh%s_se%d", c_whn[iwh], ise+1);
00424         sprintf(htitle, "Wheel %s Sector %d - BX Distribution",
00425                 c_whn[iwh], ise+1);
00426         dttf_bx[iwh][ise] = dbe_->book1D(hname, htitle, 3, -1.5, 1.5);
00427         dttf_bx[iwh][ise]->setAxisTitle("BX", 1);
00428       }
00429 
00430       std::string dttf_trk_folder_wh_bxsec_trk2 =
00431         dttf_trk_folder_wheel + "/BX_BySector/2ND_TRACK_ONLY";
00432       dbe_->setCurrentFolder(dttf_trk_folder_wh_bxsec_trk2);
00433 
00434       for(int ise = 0; ise < 12; ++ise ) {
00435         sprintf(hname, "dttf_bx_2ndTrack_wh%s_se%d", c_whn[iwh], ise+1);
00436         sprintf(htitle, "Wheel %s Sector %d - BX 2nd Tracks only",
00437                 c_whn[iwh], ise+1);
00438         dttf_bx_2ndTrack[iwh][ise] = dbe_->book1D(hname, htitle, 3, -1.5, 1.5);
00439         dttf_bx_2ndTrack[iwh][ise]->setAxisTitle("BX", 1);
00440       }
00441 
00443       std::string dttf_trk_folder_charge = dttf_trk_folder_wheel + "/Charge";
00444       dbe_->setCurrentFolder(dttf_trk_folder_charge);
00445 
00446       for(int ise = 0; ise < 12; ++ise) {
00447         sprintf(hname, "dttf_charge_wh%s_se%d", c_whn[iwh], ise+1);
00448         sprintf(htitle, "Wheel %s Sector %d - Packed Charge", c_whn[iwh], ise+1);
00449         dttf_q[iwh][ise] = dbe_->book1D(hname, htitle, 2, -0.5, 1.5);
00450         dttf_q[iwh][ise]->setAxisTitle("Charge", 1);
00451       }
00452 
00454       std::string dttf_trk_folder_pt = dttf_trk_folder_wheel + "/PT";
00455       dbe_->setCurrentFolder(dttf_trk_folder_pt);
00456 
00457       for(int ise = 0; ise < 12; ++ise ) {
00458         sprintf(hname, "dttf_pt_wh%s_se%d", c_whn[iwh], ise+1);
00459         sprintf(htitle, "Wheel %s Sector %d - Packed p_{T}",
00460                 c_whn[iwh], ise + 1 );
00461         dttf_pt[iwh][ise]= dbe_->book1D(hname, htitle, 32, -0.5, 31.5);
00462         dttf_pt[iwh][ise]->setAxisTitle("p_{T}", 1);
00463       }
00464 
00466       std::string dttf_trk_folder_phi = dttf_trk_folder_wheel + "/Phi";
00467       dbe_->setCurrentFolder(dttf_trk_folder_phi);
00468 
00469       for(int ise = 0; ise < 12; ++ise ) {
00470         sprintf(hname, "dttf_phi_wh%s_se%d", c_whn[iwh], ise+1);
00471         sprintf(htitle, "Wheel %s Sector %d - Packed Phi", c_whn[iwh], ise+1);
00472         dttf_phi[iwh][ise] = dbe_->book1D(hname, htitle, 144, -6, 138);
00473         dttf_phi[iwh][ise]->setAxisTitle("#phi", 1);
00474         //dttf_phi[iwh][ise] = dbe_->book1D(title,title, 32,-16.5, 15.5);
00475       }
00476 
00478       std::string dttf_trk_folder_quality = dttf_trk_folder_wheel + "/Quality";
00479       dbe_->setCurrentFolder(dttf_trk_folder_quality);
00480 
00481       for(int ise = 0; ise < 12; ++ise){
00482         sprintf(hname, "dttf_qual_wh%s_se%d", c_whn[iwh], ise+1);
00483         sprintf(htitle, "Wheel %s Sector %d - Packed Quality",
00484                 c_whn[iwh], ise+1);
00485         dttf_qual[iwh][ise] = dbe_->book1D(hname, htitle, 7, 1, 8);
00486         dttf_qual[iwh][ise]->setAxisTitle("Quality", 1);
00487         setQualLabel( dttf_qual[iwh][ise], 1 );
00488       }
00489 
00491       std::string dttf_trk_folder_eta = dttf_trk_folder_wheel + "/Eta";
00492       dbe_->setCurrentFolder(dttf_trk_folder_eta);
00493 
00494       for (int ise = 0; ise < 12; ++ise ) {
00495 
00496         sprintf(hname, "dttf_eta_wh%s_se%d", c_whn[iwh], ise+1);
00497         sprintf(htitle, "Wheel %s Sector %d - Packed #eta",
00498                 c_whn[iwh], ise+1);
00499         dttf_eta[iwh][ise] = dbe_->book1D(hname, htitle, 64, -0.5, 63.5);
00500         dttf_eta[iwh][ise]->setAxisTitle("#eta", 1);
00501 
00502       }
00503 
00505       dttf_trk_folder_eta = dttf_trk_folder_wheel + "/EtaFineFraction";
00506       dbe_->setCurrentFolder(dttf_trk_folder_eta);
00507 
00508       for (int ise = 0; ise < 12; ++ise ) {
00509 
00510         sprintf(hname, "dttf_etaFine_fraction_wh%s_se%d", c_whn[iwh], ise+1);
00511         sprintf(htitle, "Wheel %s Sector %d - Eta Fine Fraction",
00512                 c_whn[iwh], ise+1);
00513         dttf_eta_fine_fraction[iwh][ise] = dbe_->book1D(hname, htitle, 2, 0, 2);
00514         dttf_eta_fine_fraction[iwh][ise]->setAxisTitle("#eta", 1);
00515         dttf_eta_fine_fraction[iwh][ise]->setBinLabel(1, "fine", 1);
00516         dttf_eta_fine_fraction[iwh][ise]->setBinLabel(2, "coarse", 1);
00517 
00518       }
00519 
00520     }
00521 
00525     std::string dttf_trk_folder_inclusive = dttf_trk_folder + "/01-INCLUSIVE";
00526     dbe_->setCurrentFolder(dttf_trk_folder_inclusive);
00527 
00528 
00529     sprintf(hname, "dttf_01_nTracksPerEvent_integ");
00530     sprintf(htitle, "Number of DTTF Tracks Per Event");
00531     dttf_nTracksPerEvent_integ = dbe_->book1D(hname, htitle, 20, 0.5, 20.5);
00532     dttf_nTracksPerEvent_integ->setAxisTitle("# tracks/event", 1);
00533 
00535     // sprintf(hname, "dttf_10_qual_eta_distr");
00536     // sprintf(htitle, "DTTF Tracks Quality vs Eta Distribution");
00537     // dttf_qual_eta_integ = dbe_->book2D(hname, htitle, 64, 0, 64, 7, 1, 8);
00538     // setQualLabel( dttf_qual_eta_integ, 2);
00539 
00541     if ( online_ ) {
00542       sprintf(hname, "dttf_04_tracks_occupancy_by_lumi");
00543       sprintf(htitle, "DTTF Tracks in the last LumiSections");
00544       dttf_spare = dbe_->book2D(hname, htitle, 6, 0, 6, 12, 1, 13);
00545       setWheelLabel( dttf_spare );
00546       dttf_spare->setAxisTitle("Sector", 2);
00547       dttf_spare->getTH2F()->GetXaxis()->SetNdivisions(12);
00548     } else {
00549 
00550       sprintf(hname, "dttf_04_global_muons_request");
00551       sprintf(htitle, "Tracks compatible with a Global Muon in the Barrel");
00552       dttf_spare = dbe_->book1D(hname, htitle, 4, -0.5, 3.5 );
00553       dttf_spare->setBinLabel(1, "No tracks", 1);
00554       dttf_spare->setBinLabel(2, "No tracks but GM", 1);
00555       dttf_spare->setBinLabel(3, "Tracks wo GM", 1);
00556       dttf_spare->setBinLabel(4, "Tracks w GM", 1);
00557 
00558     }
00559 
00560     std::string dttf_trk_folder_integrated_gmt =
00561       dttf_trk_folder + "/08-GMT_MATCH";
00562     dbe_->setCurrentFolder(dttf_trk_folder_integrated_gmt);
00563 
00564     sprintf(hname, "dttf_tracks_with_gmt_match");
00565     sprintf(htitle, "DTTF Tracks With a Match in GMT");
00566     dttf_gmt_match = dbe_->book2D(hname, htitle, 6, 0., 6., 12, 1., 13.);
00567     setWheelLabel( dttf_gmt_match );
00568 
00569     sprintf(hname, "dttf_tracks_without_gmt_match");
00570     sprintf(htitle, "DTTF Tracks Without a Match in GMT");
00571     dttf_gmt_missed = dbe_->book2D(hname, htitle, 6, 0., 6., 12, 1., 13.);
00572     setWheelLabel( dttf_gmt_missed );
00573 
00574     sprintf(hname, "dttf_missing_tracks_in_gmt");
00575     sprintf(htitle, "GMT Tracks Without a Corresponding Track in DTTF");
00576     dttf_gmt_ghost = dbe_->book2D(hname, htitle, 5, -2, 3, 12, 1, 13.);
00577 
00578     dttf_gmt_ghost->setBinLabel(1, "N2", 1);
00579     dttf_gmt_ghost->setBinLabel(2, "N1", 1);
00580     dttf_gmt_ghost->setBinLabel(3, "N0/P0", 1);
00581     dttf_gmt_ghost->setBinLabel(4, "P1", 1);
00582     dttf_gmt_ghost->setBinLabel(5, "P2", 1);
00583 
00584 
00585     // sprintf(hname, "dttf_eta_phi_missing_tracks_in_gmt");
00586     // sprintf(htitle, "GMT Tracks Without a Corresponding Track in DTTF");
00587     // dttf_gmt_ghost_phys = dbe_->book2D(hname, htitle, 64, 0., 64., 144, 0., 144. );
00588 
00589 
00590   }
00591 
00592 }
00593 
00594 
00595 
00596 //--------------------------------------------------------
00597 void L1TDTTF::endJob(void)
00598 {
00599   if (verbose_) {
00600     edm::LogInfo("EndJob") << "L1TDTTF: end job....";
00601     edm::LogInfo("EndJob") << "analyzed " << nev_ << " events";
00602     edm::LogInfo("EndJob") << "containing at least one dttf track : "
00603                            << nev_dttf_;
00604     edm::LogInfo("EndJob") << "containing two dttf tracks : "
00605                            << nev_dttf_track2_;
00606   }
00607     
00608   if ( outputFile_.size() != 0  && dbe_ ) dbe_->save(outputFile_);
00609 
00610 }
00611 
00612 
00613 
00614 //--------------------------------------------------------
00615 void L1TDTTF::analyze(const edm::Event& event,
00616                       const edm::EventSetup& eventSetup)
00617 {
00618 
00619 
00620   if ( verbose_ )
00621     edm::LogInfo("L1TDTTF::Analyze::start") << "#################### START";
00622 
00624   ++nev_;
00625   memset( numTracks, 0, 72 * sizeof(int) );
00626 
00628   edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
00629   try {
00630     event.getByLabel(trackInputTag_, myL1MuDTTrackContainer);
00631   } catch (...) {
00632     edm::LogError("L1TDTTF::analyze::DataNotFound")
00633       << "can't getByLabel L1MuDTTrackContainer with label " 
00634       << dttpgSource_.label() << ":DATA:" << dttpgSource_.process();
00635     return;
00636   }
00637 
00638   if ( !myL1MuDTTrackContainer.isValid() ) {
00639     edm::LogError("L1TDTTF::analyze::DataNotFound")
00640       << "can't find L1MuDTTrackContainer with label " 
00641       << dttpgSource_.label() << ":DATA:" << dttpgSource_.process();
00642     return;
00643   }
00644 
00645   L1MuDTTrackContainer::TrackContainer * trackContainer =
00646     myL1MuDTTrackContainer->getContainer();
00647 
00649   if ( trackContainer->size() > 0 ) {
00650     ++nev_dttf_;
00651     if( trackContainer->size() > 1 ) ++nev_dttf_track2_;
00652   }
00653 
00657   bool accept = true;
00658   if ( ! online_ ) {
00659 
00660     try {
00661 
00662       edm::Handle<reco::MuonCollection> muons;
00663       event.getByLabel(muonCollectionLabel_, muons);
00664 
00665       accept = false;
00666       if ( muons.isValid() ) {
00667         for (reco::MuonCollection::const_iterator recoMu = muons->begin();
00668              recoMu!=muons->end(); ++recoMu ) {
00669           if ( fabs( recoMu->eta() ) < 1.4 ) {
00670             if ( verbose_ ) {
00671               edm::LogInfo("L1TDTTFClient::Analyze:GM") << "Found a global muon!";
00672             }
00673             accept = true;
00674             break;
00675           }
00676 
00677         }
00678 
00680         if ( ! accept ) {
00681           dttf_spare->Fill( trackContainer->size() ? 1 : 0 );
00682 
00683           if ( verbose_ ) {
00684             edm::LogInfo("L1TDTTFClient::Analyze:GM")
00685               << "No global muons in this event!";
00686           }
00687 
00688         } else {
00689           dttf_spare->Fill( trackContainer->size() ? 2 : 3 );
00690         }
00691 
00692       } else {
00694         accept = true;
00695         edm::LogWarning("L1TDTTFClient::Analyze:GM")
00696           <<  "Invalid MuonCollection with label "
00697           << muonCollectionLabel_.label();
00698       }
00699 
00700 
00701     } catch (...) {
00703       accept = true;
00704       edm::LogError("DataNotFound") << "Unable to getByLabel MuonCollection with label "
00705                                     << muonCollectionLabel_.label() ;
00706     }
00707 
00708   }
00709 
00710 
00712   std::vector<L1MuRegionalCand> gmtBx0DttfCandidates;
00713 
00714   try {
00715 
00716     edm::Handle<L1MuGMTReadoutCollection> pCollection;
00717     event.getByLabel(gmtSource_, pCollection);
00718 
00719     if ( !pCollection.isValid() ) {
00720       edm::LogError("DataNotFound") << "can't find L1MuGMTReadoutCollection with label "
00721                                     << gmtSource_.label() ;
00722     }
00723 
00724     // get GMT readout collection
00725     L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
00726     std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
00727 
00728     std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
00729 
00730     for ( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); ++RRItr ) {
00731     
00732       std::vector<L1MuRegionalCand> dttfCands = RRItr->getDTBXCands();
00733       std::vector<L1MuRegionalCand>::iterator dttfCand;
00734 
00735       for( dttfCand = dttfCands.begin(); dttfCand != dttfCands.end();
00736            ++dttfCand ) {
00737 
00738         if(dttfCand->empty()) continue;
00740         if ( RRItr->getBxInEvent() ) continue;
00741 
00742         //       dttf_gmt_ghost_phys->Fill( dttfCand->eta_packed(),
00743         //                               dttfCand->phi_packed() );
00744         gmtBx0DttfCandidates.push_back( *dttfCand );
00745 
00746       }
00747     }
00748 
00749   } catch (...) {
00750     edm::LogError("DataNotFound") << "Unable to getByLabel L1MuGMTReadoutCollection with label "
00751                                   << gmtSource_.label() ;
00752   }
00753 
00754 
00755   // fill MEs if all selections are passed
00756   if ( accept ) fillMEs( trackContainer, gmtBx0DttfCandidates );
00757 
00759   std::vector<L1MuRegionalCand>::iterator dttfCand;
00760   for( dttfCand = gmtBx0DttfCandidates.begin();
00761        dttfCand != gmtBx0DttfCandidates.end(); ++dttfCand ) {
00762     if( dttfCand->empty() ) continue;
00763 
00767     int phi= dttfCand->phi_packed();
00768     int sector = 1 + (phi + 6)/12;
00769     if (sector > 12 ) sector -= 12;
00770     double eta = dttfCand->etaValue();
00771 
00772     int wheel = -3;
00773     if ( eta < -0.74 ) {
00774       wheel = -2;
00775     } else if ( eta < -0.3 ) {
00776       wheel = -1;
00777 
00778     } else if ( eta < 0.3 ) {
00779       wheel = 0;
00780 
00781     } else if ( eta < 0.74 ) {
00782       wheel = 1;
00783     } else {
00784       wheel = 2;
00785     }
00786 
00787     dttf_gmt_ghost->Fill( wheel, sector );
00788     // dttf_gmt_ghost_phys->Fill( dttfCand->eta_packed(),
00789     //                            dttfCand->phi_packed() );
00790   }
00791 
00792 
00794   int numTracksInt = 0;
00795 
00796   for ( int w = 0; w < 6; ++w ) {
00797 
00798     int numTracks_wh = 0;
00799     for ( int s = 0; s < 12; ++s ) {
00800 
00801       dttf_nTracksPerEv[w][s]->Fill( numTracks[w][s] );
00802 
00803       numTracks_wh += numTracks[w][s];
00804 
00805     }
00806 
00807     numTracksInt += numTracks_wh;
00808     dttf_nTracksPerEvent_wheel[w]->Fill( numTracks_wh );
00809 
00810   }
00811 
00812   dttf_nTracksPerEvent_integ->Fill( numTracksInt );
00813 
00814 
00815 
00816 }
00817 
00818 
00819 
00820 
00821 //--------------------------------------------------------
00822 void L1TDTTF::fillMEs( std::vector<L1MuDTTrackCand> * trackContainer,
00823                        std::vector<L1MuRegionalCand> & gmtDttfCands )
00824 {
00825 
00826   L1MuDTTrackContainer::TrackContainer::const_iterator track
00827     = trackContainer->begin();
00828   L1MuDTTrackContainer::TrackContainer::const_iterator trackEnd
00829     = trackContainer->end();
00830 
00831   for ( ; track != trackEnd; ++track ) {
00832 
00833     if ( verbose_ ) {
00834       edm::LogInfo("L1TDTTF::Analyze") << "bx = " << track->bx();
00835       edm::LogInfo("L1TDTTF::Analyze") << "quality (packed) = "
00836                                        << track->quality_packed();
00837       edm::LogInfo("L1TDTTF::Analyze") << "pt      (packed) = "
00838                                        << track->pt_packed()
00839                                        << "  , pt  (GeV) = " << track->ptValue();
00840       edm::LogInfo("L1TDTTF::Analyze") << "phi     (packed) = "
00841                                        << track->phi_packed()
00842                                        << " , phi (rad) = " << track->phiValue();
00843       edm::LogInfo("L1TDTTF::Analyze") << "charge  (packed) = "
00844                                        << track->charge_packed();
00845     }
00846 
00847 
00849     if ( ( track->whNum() == -1 ) && ! track->eta_packed() ) {
00850       edm::LogInfo("L1TDTTF::Analyze") << "Skipping N0 with zero eta value";
00851 
00852       continue;
00853     }
00854 
00855 
00856     int bxindex = track->bx() + 1;
00857     int se = track->scNum(); 
00858     int sector = se + 1; 
00859     int whindex = track->whNum(); 
00860 
00861     whindex = ( whindex < 0 ) ? whindex + 3 : whindex + 2; 
00862 
00863     if ( whindex < 0 || whindex > 5 ) {
00864       edm::LogError("L1TDTTF::Analyze::WHEEL_ERROR") << track->whNum()
00865                                                      << "(" << whindex << ")";
00866       continue;
00867     }
00868 
00869     if ( se < 0 || se > 11 ) {
00870       edm::LogError("L1TDTTF::Analyze::SECTOR_ERROR") << se;
00871       continue;
00872     }
00873 
00875 
00877     // int phi_local = track->phi_packed();//range: 0 < phi_local < 31
00878     // if ( phi_local > 15 ) phi_local -= 32; //range: -16 < phi_local < 15
00879 
00880     // int phi_global = phi_local + se * 12; //range: -16 < phi_global < 147
00881     // if(phi_global < 0) phi_global += 144; //range: 0 < phi_global < 147
00882     // if(phi_global > 143) phi_global -= 144; //range: 0 < phi_global < 143
00883     // // float phi_phys = phi_global * 2.5 + 1.25;
00884 
00886     int phi_global = track->phi_packed();
00887     phi_global =  (phi_global > 15 ? phi_global - 32 : phi_global ) + se * 12;
00888     if ( phi_global < -6 ) phi_global += 144; //range: 0 < phi_global < 147
00889     if ( phi_global > 137 ) phi_global -= 144; //range: 0 < phi_global < 143
00890 
00891     // int eta_global = track->eta_packed();
00892     // int eta_global = track->eta_packed() - 32;
00893     // dttf_eta[bxindex][whindex][se]->Fill(eta_global);
00894     // float eta_phys = eta_global / 2.4 ;
00895 
00899 
00901     dttf_bx[whindex][se]->Fill(track->bx());
00902 
00904     if( track->TrkTag() == 1 ) {
00905 
00907       dttf_bx_2ndTrack[whindex][se]->Fill(track->bx());
00908 
00909     }
00910 
00914 
00915 
00916     if ( bxindex == 1 ) {
00917 
00919       ++numTracks[whindex][se];
00920 
00922       dttf_phi[whindex][se]->Fill(phi_global);
00923 
00925       dttf_qual[whindex][se]->Fill(track->quality_packed());
00926 
00928       dttf_pt[whindex][se]->Fill(track->pt_packed());
00929 
00931       dttf_q[whindex][se]->Fill(track->charge_packed());
00932 
00933 
00935       dttf_eta[whindex][se]->Fill( track->eta_packed() );
00936 
00937       if( track->isFineHalo() ) {
00938         
00939         dttf_eta_fine_fraction[whindex][se]->Fill( 0 );
00940 
00942         dttf_phi_eta_fine_wheel[whindex]->Fill( track->eta_packed(), phi_global );
00943 
00944       } else {
00945 
00946         dttf_eta_fine_fraction[whindex][se]->Fill( 1 );
00947 
00949         dttf_phi_eta_coarse_wheel[whindex]->Fill( track->eta_packed(), phi_global );
00950       }
00951 
00953       if ( online_ ) {
00954         dttf_spare->Fill( whindex, sector );
00955       }
00956 
00958       // dttf_qual_eta_integ->Fill(track->eta_packed(), track->quality_packed());
00959 
00961       if ( track->TrkTag() == 1 ) {
00962 
00964         dttf_phi_wheel_2ndTrack[whindex]->Fill(phi_global);
00965 
00967         dttf_pt_wheel_2ndTrack[whindex]->Fill(track->pt_packed());
00968 
00970         dttf_eta_wheel_2ndTrack[whindex]->Fill(track->eta_packed());
00971 
00973         dttf_quality_wheel_2ndTrack[whindex]->Fill(track->quality_packed());
00974 
00976         dttf_q_wheel_2ndTrack[whindex]->Fill(track->charge_packed());
00977 
00979         dttf_quality_summary_wheel_2ndTrack[whindex]->Fill( sector, track->quality_packed() );
00980 
00982         dttf_phi_eta_wheel_2ndTrack[whindex]->Fill( track->eta_packed(), phi_global );
00983 
00984       }
00985 
00987       bool match = false;
00988       std::vector<L1MuRegionalCand>::iterator dttfCand;
00990       unsigned int gmt_phi = ( phi_global < 0 ? phi_global + 144 : phi_global );
00991 
00992       for ( dttfCand = gmtDttfCands.begin(); dttfCand != gmtDttfCands.end();
00993             ++dttfCand ) {
00994 
00996         if ( dttfCand->empty() ) continue;
00997         if ( ( dttfCand->phi_packed() == gmt_phi ) &&
00998              dttfCand->quality_packed() == track->quality_packed() ) {
00999           match = true;
01000           dttfCand->reset();
01001           break;
01002         }
01003 
01004 
01005       }
01006 
01007       if ( match ) {
01008         dttf_gmt_match->Fill( whindex, sector );
01009       } else {
01010         dttf_gmt_missed->Fill( whindex, sector );
01011       }
01012 
01013     }
01014 
01015   }
01016 
01017 }
01018 
01019 
01020 //--------------------------------------------------------
01021 void L1TDTTF::setQualLabel(MonitorElement *me, int axis)
01022 {
01023 
01024   if( axis == 1 )
01025     me->setAxisTitle("Quality", axis);
01026   me->setBinLabel(1, "T34", axis);
01027   me->setBinLabel(2, "T23/24", axis);
01028   me->setBinLabel(3, "T12/13/14", axis);
01029   me->setBinLabel(4, "T234", axis);
01030   me->setBinLabel(5, "T134", axis);
01031   me->setBinLabel(6, "T123/124", axis);
01032   me->setBinLabel(7, "T1234", axis);
01033 }
01034 
01035 //--------------------------------------------------------
01036 void L1TDTTF::setWheelLabel(MonitorElement *me)
01037 {
01038   me->setAxisTitle("Wheel", 1);
01039   me->setBinLabel(1, "N2", 1);
01040   me->setBinLabel(2, "N1", 1);
01041   me->setBinLabel(3, "N0", 1);
01042   me->setBinLabel(4, "P0", 1);
01043   me->setBinLabel(5, "P1", 1);
01044   me->setBinLabel(6, "P2", 1);
01045 }
01046 
01047 
01048 
01049 //--------------------------------------------------------
01050 void L1TDTTF::bookEta( int wh, int & nbins, float & start, float & stop )
01051 {
01052 
01053   switch ( wh ) {
01054   case 0 : start = 0;  stop = 18; nbins = 18; break; // N2
01055   case 1 : start = 8;  stop = 28; nbins = 20; break; // N1
01056   case 2 : start = 22; stop = 32; nbins = 10; break; // N0
01057   case 3 : start = 22; stop = 42; nbins = 20; break; // P0
01058   case 4 : start = 36; stop = 56; nbins = 20; break; // P1
01059   case 5 : start = 46; stop = 64; nbins = 18; break; // P2
01060   default : start = 0; stop = 0;  nbins = 0;  break; // BOH
01061   }
01062 
01063 }
01064 
01065 
01066 
01067 
01068 
01069 
01070 //       ///////////////////////////////////////////////////////
01071 //       /// dttf measures per wheel: per BX assignment
01072 //       ///////////////////////////////////////////////////////
01073 
01074 //       ///      for ( int ibx = 0; ibx < 3; ++ibx ) {
01075 //       /// LEAVING ONLY BX0!!!
01076 //       for ( int ibx = 1; ibx < 2; ++ibx ) {
01077 //      int tbx = ibx - 1;
01078 
01079 //      std::string dttf_trk_folder_bx = dttf_trk_folder_wheel + bxn[ibx];
01080 //      dbe_->setCurrentFolder(dttf_trk_folder_bx);
01081 
01082 //      /// QUALITY folder
01083 //      std::string dttf_trk_folder_quality = dttf_trk_folder_bx + "/Quality";
01084 //      dbe_->setCurrentFolder(dttf_trk_folder_quality);
01085 
01086 //      for(int ise = 0; ise < 12; ++ise){
01087 //        sprintf(hname, "dttf_qual_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01088 //        sprintf(htitle, "Packed Quality bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01089 //        dttf_qual[ibx][iwh][ise] = dbe_->book1D(hname, htitle, 8, -0.5, 7.5);
01090 //        dttf_qual[ibx][iwh][ise]->setAxisTitle("Quality", 1);
01091 //      }
01092 
01093 //      /// PHI folder
01094 //      std::string dttf_trk_folder_phi = dttf_trk_folder_bx + "/Phi";
01095 //      dbe_->setCurrentFolder(dttf_trk_folder_phi);
01096 
01097 //      for(int ise = 0; ise < 12; ++ise ) {
01098 //        sprintf(hname, "dttf_phi_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01099 //        sprintf(htitle, "Packed Phi bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01100 //        dttf_phi[ibx][iwh][ise] = dbe_->book1D(hname, htitle,
01101 //                                              144, -0.5, 143.5);
01102 //        dttf_phi[ibx][iwh][ise]->setAxisTitle("#phi", 1);
01103 //        //dttf_phi[ibx][iwh][ise] = dbe_->book1D(title,title, 32,-16.5, 15.5);
01104 //      }
01105 
01106 //      /// ETA folder
01107 //      std::string dttf_trk_folder_eta = dttf_trk_folder_bx + "/Eta";
01108 //      dbe_->setCurrentFolder(dttf_trk_folder_eta);
01109 
01110 //      for (int ise = 0; ise < 12; ++ise ) {
01111 
01112 //        // sprintf(hname, "dttf_eta_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01113 //        // sprintf(htitle, "Packed Eta bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01114 //        // //dttf_eta[ibx][iwh][ise] = dbe_->book1D(hname,title,64,-32.5,32.5);//fix range and bin size!
01115 //        // dttf_eta[ibx][iwh][ise] = dbe_->book1D(hname, htitle, 64, -0.5, 63.5);
01116 //        // dttf_eta[ibx][iwh][ise]->setAxisTitle("#eta", 1);
01117 
01118 
01119 
01120 //        sprintf(hname, "dttf_eta_fine_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01121 //        sprintf(htitle, "Packed Eta Fine bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01122 //        dttf_eta_fine[ibx][iwh][ise] = dbe_->book1D(hname, htitle, 64, -0.5, 63.5);
01123 //        dttf_eta_fine[ibx][iwh][ise]->setAxisTitle("#eta", 1);
01124 
01125 
01126 
01127 //        sprintf(hname, "dttf_eta_coarse_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01128 //        sprintf(htitle, "Packed Eta Coarse bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01129 //        dttf_eta_coarse[ibx][iwh][ise] = dbe_->book1D(hname, htitle, 64, -0.5, 63.5);
01130 //        dttf_eta_coarse[ibx][iwh][ise]->setAxisTitle("#eta", 1);
01131 
01132 //      }
01133 
01134 //      /// PT folder
01135 //      std::string dttf_trk_folder_pt = dttf_trk_folder_bx + "/PT";
01136 //      dbe_->setCurrentFolder(dttf_trk_folder_pt);
01137 
01138 //      for(int ise = 0; ise < 12; ++ise ) {
01139 //        sprintf(hname, "dttf_pt_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01140 //        sprintf(htitle, "Packed PT bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01141 //        dttf_pt[ibx][iwh][ise]= dbe_->book1D(hname, htitle, 32, -0.5, 31.5);
01142 //        dttf_pt[ibx][iwh][ise]->setAxisTitle("p_{T}", 1);
01143 //      }
01144 
01145 //      /// CHARGE folder
01146 //      std::string dttf_trk_folder_charge = dttf_trk_folder_bx + "/Charge";
01147 //      dbe_->setCurrentFolder(dttf_trk_folder_charge);
01148 
01149 //      for(int ise = 0; ise < 12; ++ise) {
01150 //        sprintf(hname, "dttf_q_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01151 //        sprintf(htitle, "Packed Charge  bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01152 //        dttf_q[ibx][iwh][ise] = dbe_->book1D(hname, htitle, 2, -0.5, 1.5);
01153 //        dttf_q[ibx][iwh][ise]->setAxisTitle("Charge", 1);
01154 //      }
01155 
01156 //      /// number of tracks per event folder
01157 //      std::string dttf_trk_folder_nTracksPerEvent = dttf_trk_folder_bx+"/TracksPerEvent";
01158 //      dbe_->setCurrentFolder(dttf_trk_folder_nTracksPerEvent);
01159 
01160 //      for(int ise = 0; ise < 12; ++ise) {
01161 //        sprintf(hname, "dttf_nTracksPerEvent_bx%d_wh%s_se%d", tbx, c_whn[iwh], ise+1);
01162 //        sprintf(htitle, "Num Tracks Per Event bx%d wh%s se%d", tbx, c_whn[iwh], ise+1);
01163 //        dttf_nTracksPerEv[ibx][iwh][ise] = dbe_->book1D(hname, htitle, 2, 0.5, 2.5);
01164 //        dttf_nTracksPerEv[ibx][iwh][ise]->setAxisTitle("# tracks/event", 1);
01165 //      }
01166 
01167 //       }
01168 
01169 
01170 
01171 
01172 
01173 
01174 
01175 
01176 //--------------------------------------------------------