CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/DQM/L1TMonitor/src/L1TDTTF.cc

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