CMS 3D CMS Logo

DTLocalTriggerTask Class Reference

#include <DQM/DTMonitorModule/interface/DTLocalTriggerTask.h>

Inheritance diagram for DTLocalTriggerTask:

edm::EDAnalyzer

List of all members.

Public Member Functions

 DTLocalTriggerTask (const edm::ParameterSet &ps)
 Constructor.
virtual ~DTLocalTriggerTask ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (const edm::EventSetup &c)
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 To reset the MEs.
void bookCMSHistos (std::string histoTag)
 Book the histograms.
void bookHistos (const DTChamberId &dtCh, std::string folder, std::string histoTag)
 Book the histograms.
void computeCoordinates (const DTRecSegment4D *track, int &scsector, float &phpos, float &phdir, float &zpos, float &zdir)
 Compute track coordinates using trigger SC sectors.
void endJob (void)
 EndJob.
float phi2Pos (const DTChamberId &id, int phi)
 Convert phi to local x coordinate.
float phib2Ang (const DTChamberId &id, int phib, double phi)
 Convert phib to global angle coordinate.
std::pair< float, float > phiRange (const DTChamberId &id)
 Calculate phi range for histograms.
void runDCCAnalysis (std::vector< L1MuDTChambPhDigi > *phTrigs, std::vector< L1MuDTChambThDigi > *thTrigs)
 Run analysis on DCC data.
void runDDUAnalysis (edm::Handle< DTLocalTriggerCollection > &trigsDDU)
 Run analysis on ROS data.
void runDDUvsDCCAnalysis (std::string &trigsrc)
 Run analysis on ROS data.
void runSegmentAnalysis (edm::Handle< DTRecSegment4DCollection > &segments4D)
 Run analysis using DT 4D segments.
void setQLabels (MonitorElement *me, short int iaxis)
 Set Quality labels.
std::string & topFolder ()
 Get the Top folder (different between Physics and TP).
void triggerSource (const edm::Event &e)
 Get the L1A source.

Private Attributes

std::string baseFolder
DQMStoredbe
MonitorElementdcc_IDDataErrorPlot
int dduphcode_best [6][5][13]
int dduthcode_best [6][5][13]
bool detailedAnalysis
std::map< uint32_t, std::map
< std::string, MonitorElement * > > 
digiHistos
bool doDCCTheta
const L1MuDTChambPhDigiiphbest [6][5][13]
const DTLocalTriggeriphbestddu [6][5][13]
const L1MuDTChambThDigiithbest [6][5][13]
int mapDTTF [6][13][2]
edm::ESHandle< DTGeometrymuonGeom
int nevents
edm::ParameterSet parameters
int phcode_best [6][5][13]
int thcode_best [6][5][13]
bool tpMode
bool track_ok [6][5][15]
std::string trigsrc
bool useDCC
bool useDDU
bool useSEG

Friends

class DTMonitorModule


Detailed Description

Definition at line 43 of file DTLocalTriggerTask.h.


Constructor & Destructor Documentation

DTLocalTriggerTask::DTLocalTriggerTask ( const edm::ParameterSet ps  ) 

Constructor.

Definition at line 39 of file DTLocalTriggerTask.cc.

References baseFolder, dbe, detailedAnalysis, doDCCTheta, lat::endl(), edm::ParameterSet::getUntrackedParameter(), LogTrace, parameters, and tpMode.

00039                                                                {
00040   
00041   LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: Constructor"<<endl;
00042 
00043   tpMode           = ps.getUntrackedParameter<bool>("testPulseMode", false);
00044   detailedAnalysis = ps.getUntrackedParameter<bool>("detailedAnalysis", false);
00045   doDCCTheta       = ps.getUntrackedParameter<bool>("enableDCCTheta", false);
00046   
00047   if (tpMode) {
00048     baseFolder = "DT/11-LocalTriggerTP/";
00049   }
00050   else {
00051     baseFolder = "DT/03-LocalTrigger/";
00052   }
00053 
00054   parameters = ps;
00055   
00056   dbe = edm::Service<DQMStore>().operator->();
00057 
00058 }

DTLocalTriggerTask::~DTLocalTriggerTask (  )  [virtual]

Destructor.

Definition at line 61 of file DTLocalTriggerTask.cc.

References lat::endl(), LogTrace, and nevents.

00061                                         {
00062 
00063   LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: analyzed " << nevents << " events" << endl;
00064 
00065 }


Member Function Documentation

void DTLocalTriggerTask::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 222 of file DTLocalTriggerTask.cc.

References edm::Event::getByLabel(), edm::ParameterSet::getUntrackedParameter(), edm::Handle< T >::isValid(), nevents, parameters, runDCCAnalysis(), runDDUAnalysis(), runDDUvsDCCAnalysis(), runSegmentAnalysis(), tpMode, triggerSource(), trigsrc, useDCC, useDDU, and useSEG.

00222                                                                          {
00223   
00224   string dcc_label  = parameters.getUntrackedParameter<string>("dcc_label", "dttpgprod");
00225   string ros_label  = parameters.getUntrackedParameter<string>("ros_label", "dtunpacker");
00226   string seg_label  = parameters.getUntrackedParameter<string>("seg_label", "dt4DSegments");
00227 
00228   if (!nevents){
00229 
00230     edm::Handle<L1MuDTChambPhContainer> l1DTTPGPh;
00231     e.getByLabel(dcc_label, l1DTTPGPh);
00232     edm::Handle<L1MuDTChambThContainer> l1DTTPGTh;
00233     e.getByLabel(dcc_label, l1DTTPGTh);
00234     useDCC = (l1DTTPGPh.isValid() || l1DTTPGTh.isValid()) && parameters.getUntrackedParameter<bool>("process_dcc", true) ;
00235 
00236     Handle<DTLocalTriggerCollection> l1DDUTrigs;
00237     e.getByLabel(ros_label,l1DDUTrigs);
00238     useDDU = l1DDUTrigs.isValid() && parameters.getUntrackedParameter<bool>("process_ros", true) ;
00239 
00240     Handle<DTRecSegment4DCollection> all4DSegments;
00241     e.getByLabel(seg_label, all4DSegments);  
00242     useSEG = all4DSegments.isValid() && parameters.getUntrackedParameter<bool>("process_seg", true) ;
00243     
00244   }
00245 
00246   nevents++;
00247     
00248   triggerSource(e);  
00249 
00250   if ( useDCC ) {   
00251     edm::Handle<L1MuDTChambPhContainer> l1DTTPGPh;
00252     e.getByLabel(dcc_label,l1DTTPGPh);
00253     vector<L1MuDTChambPhDigi>*  l1PhTrig = l1DTTPGPh->getContainer();
00254 
00255     edm::Handle<L1MuDTChambThContainer> l1DTTPGTh;
00256     e.getByLabel(dcc_label,l1DTTPGTh);
00257     vector<L1MuDTChambThDigi>*  l1ThTrig = l1DTTPGTh->getContainer();
00258 
00259     runDCCAnalysis(l1PhTrig,l1ThTrig);
00260   }  
00261   if ( useDDU ) {
00262     Handle<DTLocalTriggerCollection> l1DDUTrigs;
00263     e.getByLabel(ros_label,l1DDUTrigs);
00264 
00265     runDDUAnalysis(l1DDUTrigs);
00266   }
00267   if ( !tpMode && useSEG ) {
00268     Handle<DTRecSegment4DCollection> segments4D;
00269     e.getByLabel(seg_label, segments4D);  
00270     
00271     runSegmentAnalysis(segments4D);
00272   } 
00273   if ( !tpMode && useDCC && useDDU ) {
00274     runDDUvsDCCAnalysis(trigsrc);
00275   }
00276 
00277 }

void DTLocalTriggerTask::beginJob ( const edm::EventSetup c  )  [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file DTLocalTriggerTask.cc.

References bookCMSHistos(), bookHistos(), detailedAnalysis, doDCCTheta, lat::endl(), edm::EventSetup::get(), edm::ParameterSet::getUntrackedParameter(), LogTrace, muonGeom, nevents, parameters, and tpMode.

00068                                                              {
00069 
00070  
00071   LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: BeginJob" << endl;
00072 
00073   context.get<MuonGeometryRecord>().get(muonGeom);
00074   nevents = 0;
00075 
00076   if(parameters.getUntrackedParameter<bool>("staticBooking", true)) {  // Static histo booking
00077    
00078     vector<string> trigSources;
00079     if(parameters.getUntrackedParameter<bool>("localrun", true)) {
00080       trigSources.push_back("");
00081     }
00082     else {
00083       trigSources.push_back("_DTonly");
00084       trigSources.push_back("_NoDT");
00085       trigSources.push_back("_DTalso");
00086     }
00087     vector<string>::const_iterator trigSrcIt  = trigSources.begin();
00088     vector<string>::const_iterator trigSrcEnd = trigSources.end();
00089    
00090     if(parameters.getUntrackedParameter<bool>("process_dcc", true)) {
00091       bookCMSHistos("DCC_ErrorsChamberID");
00092     }
00093     
00094     if (tpMode) {
00095       for (int stat=1;stat<5;++stat){
00096         for (int wh=-2;wh<3;++wh){
00097           for (int sect=1;sect<13;++sect){
00098             DTChamberId dtChId(wh,stat,sect);
00099             
00100             if (parameters.getUntrackedParameter<bool>("process_dcc", true)){ // DCC data
00101               bookHistos(dtChId,"LocalTriggerPhi","DCC_BXvsQual"+(*trigSrcIt));
00102               bookHistos(dtChId,"LocalTriggerPhi","DCC_QualvsPhirad"+(*trigSrcIt));
00103             }
00104             
00105             if (parameters.getUntrackedParameter<bool>("process_ros", true)){ // DDU data             
00106               bookHistos(dtChId,"LocalTriggerPhi","DDU_BXvsQual"+(*trigSrcIt));
00107             }
00108             
00109           }
00110         }
00111       } // end of loop
00112     }
00113     else {
00114       for (;trigSrcIt!=trigSrcEnd;++trigSrcIt){
00115         for (int stat=1;stat<5;++stat){
00116           for (int wh=-2;wh<3;++wh){
00117             for (int sect=1;sect<13;++sect){
00118               DTChamberId dtChId(wh,stat,sect);
00119             
00120               if (parameters.getUntrackedParameter<bool>("process_dcc", true)){ // DCC data
00121               
00122                 bookHistos(dtChId,"LocalTriggerPhi","DCC_BXvsQual"+(*trigSrcIt));
00123                 if (detailedAnalysis) {
00124                   bookHistos(dtChId,"LocalTriggerPhi","DCC_QualvsPhirad"+(*trigSrcIt));
00125                   bookHistos(dtChId,"LocalTriggerPhi","DCC_QualvsPhibend"+(*trigSrcIt));
00126                 }
00127                 bookHistos(dtChId,"LocalTriggerPhi","DCC_Flag1stvsQual"+(*trigSrcIt));
00128                 bookHistos(dtChId,"LocalTriggerPhi","DCC_BestQual"+(*trigSrcIt));
00129                 if (stat!=4 && doDCCTheta){                                                   // theta view
00130                   if (detailedAnalysis) {
00131                     bookHistos(dtChId,"LocalTriggerTheta","DCC_PositionvsBX"+(*trigSrcIt));
00132                     bookHistos(dtChId,"LocalTriggerTheta","DCC_PositionvsQual"+(*trigSrcIt));
00133                   }
00134                   bookHistos(dtChId,"LocalTriggerTheta","DCC_ThetaBXvsQual"+(*trigSrcIt));
00135                   bookHistos(dtChId,"LocalTriggerTheta","DCC_ThetaBestQual"+(*trigSrcIt));
00136                 }
00137               
00138                 if (parameters.getUntrackedParameter<bool>("process_seg", true)){ // DCC + Segemnt
00139                   bookHistos(dtChId,"Segment","DCC_PhitkvsPhitrig"+(*trigSrcIt));
00140                   bookHistos(dtChId,"Segment","DCC_PhibtkvsPhibtrig"+(*trigSrcIt));
00141                   bookHistos(dtChId,"Segment","DCC_PhiResidual"+(*trigSrcIt));
00142                   bookHistos(dtChId,"Segment","DCC_PhibResidual"+(*trigSrcIt));
00143                   bookHistos(dtChId,"Segment","DCC_HitstkvsQualtrig"+(*trigSrcIt));
00144                   bookHistos(dtChId,"Segment","DCC_TrackPosvsAngle"+(*trigSrcIt));
00145                   bookHistos(dtChId,"Segment","DCC_TrackPosvsAngleandTrig"+(*trigSrcIt));
00146                   bookHistos(dtChId,"Segment","DCC_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
00147                   if(stat!=4){
00148                     bookHistos(dtChId,"Segment","DCC_TrackThetaPosvsAngle"+(*trigSrcIt)); // theta view
00149                     bookHistos(dtChId,"Segment","DCC_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
00150                     bookHistos(dtChId,"Segment","DCC_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt));
00151                   }
00152                 }
00153               
00154               }
00155             
00156               if (parameters.getUntrackedParameter<bool>("process_ros", true)){ // DDU data
00157               
00158                 bookHistos(dtChId,"LocalTriggerPhi","DDU_BXvsQual"+(*trigSrcIt));
00159                 bookHistos(dtChId,"LocalTriggerPhi","DDU_Flag1stvsQual"+(*trigSrcIt));
00160                 bookHistos(dtChId,"LocalTriggerPhi","DDU_BestQual"+(*trigSrcIt));
00161                 if(stat!=4){                                                    // theta view
00162                   bookHistos(dtChId,"LocalTriggerTheta","DDU_ThetaBXvsQual"+(*trigSrcIt));
00163                   bookHistos(dtChId,"LocalTriggerTheta","DDU_ThetaBestQual"+(*trigSrcIt));
00164                 }
00165               
00166                 if (parameters.getUntrackedParameter<bool>("process_seg", true)){ // DDU + Segment
00167                   bookHistos(dtChId,"Segment","DDU_HitstkvsQualtrig"+(*trigSrcIt));
00168                   bookHistos(dtChId,"Segment","DDU_TrackPosvsAngle"+(*trigSrcIt));
00169                   bookHistos(dtChId,"Segment","DDU_TrackPosvsAngleandTrig"+(*trigSrcIt));
00170                   bookHistos(dtChId,"Segment","DDU_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
00171                   if(stat!=4){
00172                     bookHistos(dtChId,"Segment","DDU_TrackThetaPosvsAngle"+(*trigSrcIt)); // theta view
00173                     bookHistos(dtChId,"Segment","DDU_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
00174                     bookHistos(dtChId,"Segment","DDU_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt));
00175                   }
00176                 }
00177               
00178               }
00179             
00180               if (parameters.getUntrackedParameter<bool>("process_dcc", true) &&
00181                   parameters.getUntrackedParameter<bool>("process_ros", true)){ // DCC+DDU data
00182                 bookHistos(dtChId,"LocalTriggerPhi","COM_QualDDUvsQualDCC"+(*trigSrcIt));
00183               }
00184             
00185             }
00186           }
00187         }
00188       }// end of loop
00189     }
00190     
00191   }
00192   
00193 }

void DTLocalTriggerTask::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
) [protected, virtual]

To reset the MEs.

Reimplemented from edm::EDAnalyzer.

Definition at line 195 of file DTLocalTriggerTask.cc.

References digiHistos, lat::endl(), edm::ParameterSet::getUntrackedParameter(), histo, edm::LuminosityBlock::id(), LogTrace, edm::LuminosityBlockID::luminosityBlock(), and parameters.

00195                                                                                                        {
00196   
00197   LogTrace("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: Begin of LS transition" << endl;
00198   
00199   if(lumiSeg.id().luminosityBlock()%parameters.getUntrackedParameter<int>("ResetCycle", 3) == 0) {
00200     for(map<uint32_t, map<string, MonitorElement*> > ::const_iterator histo = digiHistos.begin();
00201         histo != digiHistos.end();
00202         histo++) {
00203       for(map<string, MonitorElement*> ::const_iterator ht = (*histo).second.begin();
00204           ht != (*histo).second.end();
00205           ht++) {
00206         (*ht).second->Reset();
00207       }
00208     }
00209   }
00210   
00211 }

void DTLocalTriggerTask::bookCMSHistos ( std::string  histoTag  )  [protected]

Book the histograms.

Referenced by beginJob().

void DTLocalTriggerTask::bookHistos ( const DTChamberId dtCh,
std::string  folder,
std::string  histoTag 
) [protected]

Book the histograms.

Referenced by beginJob(), runDCCAnalysis(), runDDUAnalysis(), and runSegmentAnalysis().

void DTLocalTriggerTask::computeCoordinates ( const DTRecSegment4D track,
int scsector,
float &  phpos,
float &  phdir,
float &  zpos,
float &  zdir 
) [protected]

Compute track coordinates using trigger SC sectors.

Definition at line 928 of file DTLocalTriggerTask.cc.

References DTRecSegment4D::chamberId(), DTRecSegment4D::localDirection(), DTRecSegment4D::localPosition(), muonGeom, Geom::pi(), GeomDet::position(), DTChamberId::sector(), DTChamberId::station(), GeomDet::toGlobal(), GeomDet::toLocal(), DTChamberId::wheel(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by runSegmentAnalysis().

00933                                                         {
00934 
00935 
00936   float xcenter;        
00937   LocalPoint lpos;
00938   int wheel = track->chamberId().wheel();          
00939   int sector = track->chamberId().sector();
00940   int station = track->chamberId().station();
00941   const DTChamber* chamb;
00942   const DTChamber* scchamb;
00943   phdir = atan(track->localDirection().x()/ track->localDirection().z())/Geom::pi()*180.;
00944   zdir = atan(track->localDirection().y()/ track->localDirection().z())/Geom::pi()*180.;
00945 
00946 
00947   if (station == 4){
00948     switch (sector) {
00949     case 4:
00950       scsector = 4;
00951       chamb   = muonGeom->chamber(DTChamberId(wheel,station,13));
00952       scchamb = muonGeom->chamber(DTChamberId(wheel,station,4));
00953       xcenter = scchamb->toLocal(chamb->position()).x()*.5;
00954       phpos = track->localPosition().x()-xcenter;
00955       zpos  = track->localPosition().y();
00956       break;
00957     case 10:
00958       scsector = 10;
00959       chamb   = muonGeom->chamber(DTChamberId(wheel,station,14));
00960       scchamb = muonGeom->chamber(DTChamberId(wheel,station,10));
00961       xcenter = scchamb->toLocal(chamb->position()).x()*.5;
00962       phpos = track->localPosition().x()-xcenter;
00963       zpos = track->localPosition().y();
00964       break;
00965     case 13:
00966       scsector = 4;
00967       chamb   = muonGeom->chamber(DTChamberId(wheel,station,sector));
00968       scchamb = muonGeom->chamber(DTChamberId(wheel,station,scsector));
00969       lpos = scchamb->toLocal(chamb->toGlobal(track->localPosition()));
00970       xcenter = scchamb->toLocal(chamb->position()).x()*.5;
00971       phpos = lpos.x()-xcenter;
00972       zpos  = lpos.y();
00973       break;
00974     case 14:
00975       scsector = 10;
00976       chamb   = muonGeom->chamber(DTChamberId(wheel,station,sector));
00977       scchamb = muonGeom->chamber(DTChamberId(wheel,station,scsector));
00978       lpos = scchamb->toLocal(chamb->toGlobal(track->localPosition()));
00979       xcenter = scchamb->toLocal(chamb->position()).x()*.5;
00980       phpos = lpos.x()-xcenter;
00981       zpos  = lpos.y();
00982       break;
00983     default:
00984       scsector = sector;
00985       phpos = track->localPosition().x();
00986       zpos  = track->localPosition().y();
00987     }
00988   }
00989   else {
00990     scsector = sector;
00991     phpos = track->localPosition().x();
00992     zpos  = track->localPosition().y();
00993   }
00994 
00995 }

void DTLocalTriggerTask::endJob ( void   )  [protected, virtual]

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 214 of file DTLocalTriggerTask.cc.

References dbe, lat::endl(), nevents, DQMStore::rmdir(), and topFolder().

00214                                {
00215 
00216   LogVerbatim("DTDQM|DTMonitorModule|DTLocalTriggerTask") << "[DTLocalTriggerTask]: analyzed " << nevents << " events" << endl;
00217   dbe->rmdir(topFolder());
00218 
00219 }

float DTLocalTriggerTask::phi2Pos ( const DTChamberId id,
int  phi 
) [protected]

Convert phi to local x coordinate.

Definition at line 1042 of file DTLocalTriggerTask.cc.

References funct::cos(), muonGeom, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), Geom::pi(), funct::tan(), muonGeometry::wheel, and x.

Referenced by runDCCAnalysis(), and runSegmentAnalysis().

01042                                                                 {
01043 
01044   float phin = (id.sector()-1)*Geom::pi()/6;
01045   GlobalPoint gpos = muonGeom->chamber(id)->position();
01046   float deltaphi =  gpos.phi()-phin;
01047 
01048   if (id.station() == 4 && ( id.sector() == 4 || id.sector() == 10))
01049     deltaphi = 0;
01050 
01051   float x = (tan(phi/4096.)-tan(deltaphi))*gpos.perp()*cos(deltaphi);
01052   
01053   if (id.wheel()>0 || (id.wheel()==0 && id.sector()%4>1)) 
01054     x= -x;
01055 
01056   return x;
01057 
01058 }

float DTLocalTriggerTask::phib2Ang ( const DTChamberId id,
int  phib,
double  phi 
) [protected]

Convert phib to global angle coordinate.

Definition at line 1061 of file DTLocalTriggerTask.cc.

References Geom::pi(), and muonGeometry::wheel.

Referenced by runDCCAnalysis(), and runSegmentAnalysis().

01061                                                                               {
01062   
01063   float fphi = phib/512.+phi/4096.;//+(id.sector()-4)*Geom::pi()/6.;
01064   fphi *= 180./Geom::pi();
01065 
01066   if (id.wheel()<0 || (id.wheel()==0 && id.sector()%4<=1)) 
01067     fphi = -fphi;
01068 
01069   return fphi;
01070 
01071 }

pair< float, float > DTLocalTriggerTask::phiRange ( const DTChamberId id  )  [protected]

Calculate phi range for histograms.

Definition at line 998 of file DTLocalTriggerTask.cc.

References DTTopology::firstChannel(), DTTopology::lastChannel(), max, min, muonGeom, GeomDet::position(), DTLayer::specificTopology(), GeomDet::toLocal(), DTTopology::wirePosition(), and x.

00998                                                                    {
00999 
01000   float min,max;
01001   int station = id.station();
01002   int sector  = id.sector(); 
01003   int wheel   = id.wheel();
01004   
01005   const DTLayer  *layer = muonGeom->layer(DTLayerId(id,1,1));
01006   DTTopology topo = layer->specificTopology();
01007   min = topo.wirePosition(topo.firstChannel());
01008   max = topo.wirePosition(topo.lastChannel());
01009 
01010   if (station == 4){
01011     
01012     const DTLayer *layer2;
01013     float lposx;
01014     
01015     if (sector == 4){
01016       layer2  = muonGeom->layer(DTLayerId(wheel,station,13,1,1));
01017       lposx = layer->toLocal(layer2->position()).x();
01018     }
01019     else if (sector == 10){
01020       layer2 = muonGeom->layer(DTLayerId(wheel,station,14,1,1));
01021       lposx = layer->toLocal(layer2->position()).x();
01022     }
01023     else
01024       return make_pair(min,max);
01025     
01026     DTTopology topo2 = layer2->specificTopology();
01027 
01028     if (lposx>0){
01029       max =  lposx*.5 + topo2.wirePosition(topo2.lastChannel());
01030       min -= lposx*.5;
01031     }
01032     else{ 
01033       min =  lposx*.5 + topo2.wirePosition(topo2.firstChannel());
01034       max -= lposx*.5;
01035     }
01036   }
01037 
01038   return make_pair(min,max);
01039  
01040 }

void DTLocalTriggerTask::runDCCAnalysis ( std::vector< L1MuDTChambPhDigi > *  phTrigs,
std::vector< L1MuDTChambThDigi > *  thTrigs 
) [protected]

Run analysis on DCC data.

Definition at line 453 of file DTLocalTriggerTask.cc.

References angle(), bookHistos(), dcc_IDDataErrorPlot, detailedAnalysis, digiHistos, doDCCTheta, MonitorElement::Fill(), i, id, iphbest, ithbest, j, k, phcode_best, phi2Pos(), phib2Ang(), DetId::rawId(), st, thcode_best, tpMode, trigsrc, and x.

Referenced by analyze().

00454                                                                                 {
00455 
00456   string histoType ;
00457   string histoTag ;
00458 
00459   // define best quality trigger segment (phi and theta)  
00460   // in any station start from 1 and zero is kept empty
00461   for (int i=0;i<5;++i){
00462     for (int j=0;j<6;++j){
00463       for (int k=0;k<13;++k){
00464         phcode_best[j][i][k] = -1;
00465         thcode_best[j][i][k] = -1;
00466       }
00467     }
00468   }
00469 
00470   vector<L1MuDTChambPhDigi>::const_iterator iph  = phTrigs->begin();
00471   vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
00472   for(; iph !=iphe ; ++iph) {
00473 
00474     int phwheel = iph->whNum();
00475     int phsec   = iph->scNum() + 1; // SM The track finder goes from 0 to 11. I need them from 1 to 12 !!!!!
00476     int phst    = iph->stNum();
00477     int phbx    = iph->bxNum();
00478     int phcode  = iph->code();
00479     int phi1st  = iph->Ts2Tag();
00480     int phphi   = iph->phi();
00481     int phphiB  = iph->phiB();
00482 
00483     // FIXME: workaround for DCC data with station ID 
00484     if(phst == 0) {
00485       dcc_IDDataErrorPlot->Fill(phwheel);
00486       continue;
00487     }
00488 
00489     if(phcode>phcode_best[phwheel+3][phst][phsec] && phcode<7) {
00490       phcode_best[phwheel+3][phst][phsec]=phcode; 
00491       iphbest[phwheel+3][phst][phsec] = &(*iph);
00492     }
00493       
00494     DTChamberId dtChId(phwheel,phst,phsec);
00495       
00496     float x     = phi2Pos(dtChId,phphi);
00497     float angle = phib2Ang(dtChId,phphiB,phphi);
00498     uint32_t indexCh = dtChId.rawId();
00499     
00500     map<string, MonitorElement*> &innerME = digiHistos[indexCh];
00501     if (innerME.find("DCC_BXvsQual"+trigsrc) == innerME.end()){
00502       if (tpMode) {
00503         bookHistos(dtChId,"LocalTriggerPhi","DCC_BXvsQual"+trigsrc);
00504         bookHistos(dtChId,"LocalTriggerPhi","DCC_QualvsPhirad"+trigsrc);
00505       }
00506       else {
00507         bookHistos(dtChId,"LocalTriggerPhi","DCC_BXvsQual"+trigsrc);
00508         bookHistos(dtChId,"LocalTriggerPhi","DCC_Flag1stvsQual"+trigsrc);
00509         if (detailedAnalysis) {
00510           bookHistos(dtChId,"LocalTriggerPhi","DCC_QualvsPhirad"+trigsrc);
00511           bookHistos(dtChId,"LocalTriggerPhi","DCC_QualvsPhibend"+trigsrc);
00512         }
00513       }
00514     }
00515 
00516     if (tpMode) {
00517       innerME.find("DCC_BXvsQual"+trigsrc)->second->Fill(phcode,phbx-phi1st);    // SM BX vs Qual Phi view (1st tracks) 
00518       innerME.find("DCC_QualvsPhirad"+trigsrc)->second->Fill(x,phcode);          // SM Qual vs radial angle Phi view
00519     }
00520     else {
00521       innerME.find("DCC_BXvsQual"+trigsrc)->second->Fill(phcode,phbx-phi1st);    // SM BX vs Qual Phi view (1st tracks) 
00522       innerME.find("DCC_Flag1stvsQual"+trigsrc)->second->Fill(phcode,phi1st);    // SM Qual 1st/2nd track flag Phi view
00523       if (detailedAnalysis) {
00524         innerME.find("DCC_QualvsPhirad"+trigsrc)->second->Fill(x,phcode);          // SM Qual vs radial angle Phi view
00525         innerME.find("DCC_QualvsPhibend"+trigsrc)->second->Fill(angle,phcode);     // SM Qual vs bending Phi view
00526       }
00527     }
00528       
00529   } 
00530 
00531   if (doDCCTheta) {
00532     int thcode[7];
00533     vector<L1MuDTChambThDigi>::const_iterator ith  = thTrigs->begin();
00534     vector<L1MuDTChambThDigi>::const_iterator ithe = thTrigs->end();
00535     for(; ith != ithe; ++ith) {
00536       int thwheel = ith->whNum();
00537       int thsec   = ith->scNum() + 1; // SM The track finder goes from 0 to 11. I need them from 1 to 12 !!!!!
00538       int thst    = ith->stNum();
00539       int thbx    = ith->bxNum();
00540       
00541       for (int pos=0; pos<7; pos++) {
00542         thcode[pos] = ith->code(pos);
00543 
00544         if(thcode[pos]>thcode_best[thwheel+3][thst][thsec] ) {
00545           thcode_best[thwheel+3][thst][thsec]=thcode[pos]; 
00546           ithbest[thwheel+3][thst][thsec] = &(*ith);
00547         }
00548       } 
00549       
00550       DTChamberId dtChId(thwheel,thst,thsec);
00551       uint32_t indexCh = dtChId.rawId();   
00552 
00553       map<string, MonitorElement*> &innerME = digiHistos[indexCh];
00554       if (innerME.find("DCC_ThetaBXvsQual"+trigsrc) == innerME.end()){
00555         bookHistos(dtChId,"LocalTriggerTheta","DCC_ThetaBXvsQual"+trigsrc);
00556         if (detailedAnalysis) {
00557           bookHistos(dtChId,"LocalTriggerTheta","DCC_PositionvsBX"+trigsrc);
00558           bookHistos(dtChId,"LocalTriggerTheta","DCC_PositionvsQual"+trigsrc);
00559         }
00560       }
00561 
00562       for (int pos=0; pos<7; pos++) { //SM fill position for non zero position bit in theta view
00563         if(thcode[pos]>0){
00564           int thqual = (thcode[pos]/2)*2+1;
00565           innerME.find("DCC_ThetaBXvsQual"+trigsrc)->second->Fill(thqual,thbx);      // SM BX vs Code Theta view
00566           if (detailedAnalysis) {
00567             innerME.find("DCC_PositionvsBX"+trigsrc)->second->Fill(thbx,pos);          // SM BX vs Position Theta view
00568             innerME.find("DCC_PositionvsQual"+trigsrc)->second->Fill(thqual,pos);      // SM Code vs Position Theta view
00569           }
00570         }
00571       }
00572     }
00573   }
00574 
00575   
00576   // Fill Quality plots with best DCC triggers in phi & theta
00577   if (!tpMode) {
00578     for (int st=1;st<5;++st){
00579       for (int wh=-2;wh<3;++wh){
00580         for (int sc=1;sc<13;++sc){
00581           if (phcode_best[wh+3][st][sc]>-1 && phcode_best[wh+3][st][sc]<7){
00582             DTChamberId id(wh,st,sc);
00583             uint32_t indexCh = id.rawId();
00584             map<string, MonitorElement*> &innerME = digiHistos[indexCh];
00585             if (innerME.find("DCC_BestQual"+trigsrc) == innerME.end())
00586               bookHistos(id,"LocalTriggerPhi","DCC_BestQual"+trigsrc);
00587             innerME.find("DCC_BestQual"+trigsrc)->second->Fill(phcode_best[wh+3][st][sc]);  // CB Best Qual Trigger Phi view
00588           }
00589           if (thcode_best[wh+3][st][sc]>0){
00590             DTChamberId id(wh,st,sc);
00591             uint32_t indexCh = id.rawId();
00592             map<string, MonitorElement*> &innerME = digiHistos[indexCh];
00593             if (innerME.find("DCC_ThetaBestQual"+trigsrc) == innerME.end())
00594               bookHistos(id,"LocalTriggerTheta","DCC_ThetaBestQual"+trigsrc);
00595             innerME.find("DCC_ThetaBestQual"+trigsrc)->second->Fill(thcode_best[wh+3][st][sc]); // CB Best Qual Trigger Theta view
00596           }
00597         }
00598       }
00599     }
00600   }
00601 
00602 }

void DTLocalTriggerTask::runDDUAnalysis ( edm::Handle< DTLocalTriggerCollection > &  trigsDDU  )  [protected]

Run analysis on ROS data.

Definition at line 604 of file DTLocalTriggerTask.cc.

References bookHistos(), dduphcode_best, dduthcode_best, digiHistos, i, iphbestddu, j, k, st, tpMode, and trigsrc.

Referenced by analyze().

00604                                                                                  {
00605     
00606   DTLocalTriggerCollection::DigiRangeIterator detUnitIt;
00607     
00608   for (int i=0;i<5;++i){
00609     for (int j=0;j<6;++j){
00610       for (int k=0;k<13;++k){
00611         dduphcode_best[j][i][k] = -1;
00612         dduthcode_best[j][i][k] = -1;
00613       }
00614     }
00615   }
00616 
00617   for (detUnitIt=trigsDDU->begin();
00618        detUnitIt!=trigsDDU->end();
00619        ++detUnitIt){
00620       
00621     const DTChamberId& id = (*detUnitIt).first;
00622     const DTLocalTriggerCollection::Range& range = (*detUnitIt).second;
00623     uint32_t indexCh = id.rawId();
00624     map<string, MonitorElement*> &innerME = digiHistos[indexCh];
00625       
00626     int wh = id.wheel();
00627     int sec = id.sector();
00628     int st = id.station();
00629 
00630     for (DTLocalTriggerCollection::const_iterator trigIt = range.first;
00631          trigIt!=range.second;
00632          ++trigIt){
00633         
00634       int bx = trigIt->bx();
00635       int quality = trigIt->quality();
00636       int thqual = trigIt->trTheta();
00637       int flag1st = trigIt->secondTrack() ? 1 : 0;
00638 
00639       // check if SC data exist: fill for any trigger
00640       if( quality>-1 && quality<7 ) {     // it is a phi trigger
00641         
00642         if(quality>dduphcode_best[wh+3][st][sec]) {
00643           dduphcode_best[wh+3][st][sec]=quality;
00644           iphbestddu[wh+3][st][sec] = &(*trigIt);
00645         }
00646         
00647         if (innerME.find("DDU_BXvsQual"+trigsrc) == innerME.end()){
00648           bookHistos(id,"LocalTriggerPhi","DDU_BXvsQual"+trigsrc);
00649           bookHistos(id,"LocalTriggerPhi","DDU_Flag1stvsQual"+trigsrc);
00650         }
00651 
00652         if(tpMode) {      
00653           innerME.find("DDU_BXvsQual"+trigsrc)->second->Fill(quality,bx-flag1st);     // SM BX vs Qual Phi view 
00654         }
00655         else {
00656           innerME.find("DDU_BXvsQual"+trigsrc)->second->Fill(quality,bx-flag1st);     // SM BX vs Qual Phi view 
00657           innerME.find("DDU_Flag1stvsQual"+trigsrc)->second->Fill(quality,flag1st); // SM Quality vs 1st/2nd track flag Phi view
00658         }
00659       }
00660       if( thqual>0 && !tpMode ) {  // it is a theta trigger
00661         
00662         if(thqual>dduthcode_best[wh+3][st][sec] ) {
00663           dduthcode_best[wh+3][st][sec]=thqual; 
00664         }
00665         if (innerME.find("DDU_ThetaBXvsQual"+trigsrc) == innerME.end())
00666           bookHistos(id,"LocalTriggerTheta","DDU_ThetaBXvsQual"+trigsrc);
00667         innerME.find("DDU_ThetaBXvsQual"+trigsrc)->second->Fill(thqual,bx);     // SM BX vs Qual Theta view
00668         
00669       }
00670     }
00671     
00672     // Fill Quality plots with best ddu triggers in phi & theta
00673     if (!tpMode) {
00674       if (dduphcode_best[wh+3][st][sec]>-1 &&
00675           dduphcode_best[wh+3][st][sec]<7){
00676         if (innerME.find("DDU_BestQual"+trigsrc) == innerME.end())
00677           bookHistos(id,"LocalTriggerPhi","DDU_BestQual"+trigsrc);
00678         innerME.find("DDU_BestQual"+trigsrc)->second->Fill(dduphcode_best[wh+3][st][sec]);  // CB Best Qual Trigger Phi view
00679       }
00680       if (dduthcode_best[wh+3][st][sec]>0){
00681         if (innerME.find("DDU_ThetaBestQual"+trigsrc) == innerME.end())
00682           bookHistos(id,"LocalTriggerTheta","DDU_ThetaBestQual"+trigsrc);
00683         innerME.find("DDU_ThetaBestQual"+trigsrc)->second->Fill(dduthcode_best[wh+3][st][sec]); // CB Best Qual Trigger Theta view
00684       }  
00685     }
00686   }
00687   
00688 }

void DTLocalTriggerTask::runDDUvsDCCAnalysis ( std::string &  trigsrc  )  [protected]

Run analysis on ROS data.

Referenced by analyze().

void DTLocalTriggerTask::runSegmentAnalysis ( edm::Handle< DTRecSegment4DCollection > &  segments4D  )  [protected]

Run analysis using DT 4D segments.

Definition at line 691 of file DTLocalTriggerTask.cc.

References bookHistos(), DTRecSegment4D::chamberId(), code, computeCoordinates(), dduphcode_best, dduthcode_best, digiHistos, iphbest, phcode_best, L1MuDTChambPhDigi::phi(), phi2Pos(), phib2Ang(), range, DetId::rawId(), thcode_best, track, track_ok, trigsrc, useDCC, useDDU, and DTChamberId::wheel().

Referenced by analyze().

00691                                                                                        {    
00692 
00693   DTRecSegment4DCollection::const_iterator track;
00694 
00695   // Find best tracks & good tracks
00696   memset(track_ok,false,450*sizeof(bool));
00697 
00698   DTRecSegment4DCollection::id_iterator chamberId;
00699   vector<const DTRecSegment4D*> best4DSegments;
00700 
00701   // Preliminary loop finds best 4D Segment and high quality ones
00702   for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId){
00703 
00704     DTRecSegment4DCollection::range  range = segments4D->get(*chamberId);
00705     const DTRecSegment4D* tmpBest=0;
00706     int tmpdof = 0;
00707     int dof = 0;
00708 
00709     for ( track = range.first; track != range.second; ++track){
00710 
00711       if( (*track).hasPhi() ) {
00712         
00713         dof = (*track).phiSegment()->degreesOfFreedom();
00714         if ( dof>tmpdof ){
00715           tmpBest = &(*track);
00716           tmpdof = dof;
00717         
00718           int wheel = (*track).chamberId().wheel();
00719           int sector = (*track).chamberId().sector();
00720           int station = (*track).chamberId().station();
00721           if (sector==13){
00722             sector=4;
00723           }
00724           else if (sector==14){
00725             sector=10;
00726           }
00727           track_ok[wheel+3][station][sector] = (!track_ok[wheel+3][station][sector] && dof>=2);
00728         }
00729 
00730       }
00731     }
00732     if (tmpBest) best4DSegments.push_back(tmpBest);
00733   }
00734     
00735   vector<const DTRecSegment4D*>::const_iterator btrack;
00736 
00737   for ( btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack ){
00738 
00739     if( (*btrack)->hasPhi() ) { // Phi component
00740         
00741       int wheel = (*btrack)->chamberId().wheel();
00742       int station = (*btrack)->chamberId().station();
00743       int scsector = 0;
00744       float x_track, y_track, x_angle, y_angle;
00745       computeCoordinates((*btrack),scsector,x_track,x_angle,y_track,y_angle);
00746       int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom()+2;
00747         
00748       DTChamberId dtChId(wheel,station,scsector);  // get chamber for histograms
00749       uint32_t indexCh = dtChId.rawId(); 
00750       map<string, MonitorElement*> &innerME = digiHistos[indexCh];
00751 
00752 
00753       if (useDDU && 
00754           dduphcode_best[wheel+3][station][scsector] > -1 && 
00755           dduphcode_best[wheel+3][station][scsector] < 7 ) {
00756 
00757         // SM hits of the track vs quality of the trigger
00758         if (innerME.find("DDU_HitstkvsQualtrig"+trigsrc) == innerME.end())
00759           bookHistos(dtChId,"Segment","DDU_HitstkvsQualtrig"+trigsrc);
00760         innerME.find("DDU_HitstkvsQualtrig"+trigsrc)->second->Fill(dduphcode_best[wheel+3][station][scsector],nHitsPhi);
00761 
00762       }
00763         
00764       if (useDCC &&
00765           phcode_best[wheel+3][station][scsector] > -1 && 
00766           phcode_best[wheel+3][station][scsector] < 7 ) {
00767             
00768         int phphi = iphbest[wheel+3][station][scsector]->phi();
00769         float x_trigger = phi2Pos(dtChId,phphi);
00770         float angle_trigger = phib2Ang(dtChId,iphbest[wheel+3][station][scsector]->phiB(),phphi);
00771             
00772         if (innerME.find("DCC_HitstkvsQualtrig"+trigsrc) == innerME.end()){
00773           bookHistos(dtChId,"Segment","DCC_PhiResidual"+trigsrc);
00774           bookHistos(dtChId,"Segment","DCC_PhibResidual"+trigsrc);
00775           bookHistos(dtChId,"Segment","DCC_PhitkvsPhitrig"+trigsrc);
00776           bookHistos(dtChId,"Segment","DCC_PhibtkvsPhibtrig"+trigsrc);
00777           bookHistos(dtChId,"Segment","DCC_HitstkvsQualtrig"+trigsrc);
00778         }
00779 
00780         innerME.find("DCC_PhitkvsPhitrig"+trigsrc)->second->Fill(x_trigger,x_track);
00781         innerME.find("DCC_PhibtkvsPhibtrig"+trigsrc)->second->Fill(angle_trigger,x_angle);
00782         
00783         if (phcode_best[wheel+3][station][scsector]> 3){
00784           innerME.find("DCC_PhiResidual"+trigsrc)->second->Fill(x_trigger-x_track);
00785           innerME.find("DCC_PhibResidual"+trigsrc)->second->Fill(angle_trigger-x_angle);
00786         }
00787 
00788         innerME.find("DCC_HitstkvsQualtrig"+trigsrc)->second->Fill(iphbest[wheel+3][station][scsector]->code(),nHitsPhi);
00789 
00790       }
00791 
00792       
00793       if (useDCC) {
00794           
00795         // check for triggers elsewhere in the sector
00796         bool trigFlagDCC =false;
00797         for (int ist=1; ist<5; ist++){
00798           if (ist!=station &&
00799               phcode_best[wheel+3][ist][scsector]>=2 && 
00800               phcode_best[wheel+3][ist][scsector]<7 &&
00801               track_ok[wheel+3][ist][scsector]==true){
00802             trigFlagDCC = true;
00803             break;
00804           }
00805         }
00806           
00807         if (trigFlagDCC && fabs(x_angle)<40. && nHitsPhi>=7){
00808 
00809           if (innerME.find("DCC_TrackPosvsAngle"+trigsrc) == innerME.end()){
00810             bookHistos(dtChId,"Segment","DCC_TrackPosvsAngle"+trigsrc);
00811             bookHistos(dtChId,"Segment","DCC_TrackPosvsAngleandTrig"+trigsrc);
00812             bookHistos(dtChId,"Segment","DCC_TrackPosvsAngleandTrigHHHL"+trigsrc);
00813           }
00814             
00815           // position vs angle of track for reconstruced tracks (denom. for trigger efficiency)
00816           innerME.find("DCC_TrackPosvsAngle"+trigsrc)->second->Fill(x_angle,x_track);     
00817           if (phcode_best[wheel+3][station][scsector] >= 2 && phcode_best[wheel+3][station][scsector] < 7) {
00818             innerME.find("DCC_TrackPosvsAngleandTrig"+trigsrc)->second->Fill(x_angle,x_track);    
00819             if (phcode_best[wheel+3][station][scsector] > 4){  //HH & HL Triggers
00820               innerME.find("DCC_TrackPosvsAngleandTrigHHHL"+trigsrc)->second->Fill(x_angle,x_track);      
00821             }         
00822           }
00823 
00824         }
00825           
00826         if ((*btrack)->hasZed() && trigFlagDCC && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
00827 
00828           if (innerME.find("DCC_TrackThetaPosvsAngle"+trigsrc) == innerME.end()){
00829             bookHistos(dtChId,"Segment","DCC_TrackThetaPosvsAngle"+trigsrc);
00830             bookHistos(dtChId,"Segment","DCC_TrackThetaPosvsAngleandTrig"+trigsrc);
00831             bookHistos(dtChId,"Segment","DCC_TrackThetaPosvsAngleandTrigH"+trigsrc);
00832           }
00833 
00834           // position va angle of track for reconstruced tracks (denom. for trigger efficiency) along theta direction
00835           innerME.find("DCC_TrackThetaPosvsAngle"+trigsrc)->second->Fill(y_angle,y_track);
00836           if (thcode_best[wheel+3][station][scsector] > 0) {            
00837             innerME.find("DCC_TrackThetaPosvsAngleandTrig"+trigsrc)->second->Fill(y_angle,y_track);
00838             if (thcode_best[wheel+3][station][scsector] == 3) {
00839               innerME.find("DCC_TrackThetaPosvsAngleH"+trigsrc)->second->Fill(y_angle,y_track);
00840             }            
00841           }
00842 
00843         }  
00844       }
00845 
00846       if (useDDU) {
00847           
00848         // check for triggers elsewhere in the sector
00849         bool trigFlagDDU =false;
00850         for (int ist=1; ist<5; ist++){
00851           if (ist!=station &&
00852               dduphcode_best[wheel+3][ist][scsector]>=2 && 
00853               dduphcode_best[wheel+3][ist][scsector]<7 &&
00854               track_ok[wheel+3][ist][scsector]==true){
00855             trigFlagDDU = true;
00856             break;
00857           }
00858         }
00859 
00860         if (trigFlagDDU && fabs(x_angle)<40. && nHitsPhi>=7){
00861 
00862           if (innerME.find("DDU_TrackPosvsAngle"+trigsrc) == innerME.end()){
00863             bookHistos(dtChId,"Segment","DDU_TrackPosvsAngle"+trigsrc);
00864             bookHistos(dtChId,"Segment","DDU_TrackPosvsAngleandTrig"+trigsrc);
00865             bookHistos(dtChId,"Segment","DDU_TrackPosvsAngleandTrigHHHL"+trigsrc);
00866           }
00867 
00868           // position vs angle of track for reconstruced tracks (denom. for trigger efficiency)
00869           innerME.find("DDU_TrackPosvsAngle"+trigsrc)->second->Fill(x_angle,x_track);
00870           if (dduphcode_best[wheel+3][station][scsector] >= 2 && dduphcode_best[wheel+3][station][scsector] < 7) {
00871           innerME.find("DDU_TrackPosvsAngleandTrig"+trigsrc)->second->Fill(x_angle,x_track);
00872             if (dduphcode_best[wheel+3][station][scsector] > 4){  //HH & HL Triggers
00873               innerME.find("DDU_TrackPosvsAngleandTrigHHHL"+trigsrc)->second->Fill(x_angle,x_track);      
00874             }         
00875           }
00876 
00877         }
00878           
00879         if ((*btrack)->hasZed() && trigFlagDDU && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
00880 
00881           if (innerME.find("DDU_TrackThetaPosvsAngle"+trigsrc) == innerME.end()){
00882             bookHistos(dtChId,"Segment","DDU_TrackThetaPosvsAngle"+trigsrc);
00883             bookHistos(dtChId,"Segment","DDU_TrackThetaPosvsAngleandTrig"+trigsrc);
00884             bookHistos(dtChId,"Segment","DDU_TrackThetaPosvsAngleandTrigH"+trigsrc);
00885           }
00886 
00887           // position va angle of track for reconstruced tracks (denom. for trigger efficiency) along theta direction
00888           innerME.find("DDU_TrackThetaPosvsAngle"+trigsrc)->second->Fill(y_angle,y_track);
00889           if (dduthcode_best[wheel+3][station][scsector] > 0) {         
00890             innerME.find("DDU_TrackThetaPosvsAngleandTrig"+trigsrc)->second->Fill(y_angle,y_track);
00891             if (dduthcode_best[wheel+3][station][scsector] == 3) {
00892               innerME.find("DDU_TrackThetaPosvsAngleandTrigH"+trigsrc)->second->Fill(y_angle,y_track);
00893             }            
00894           }
00895 
00896         }  
00897       }
00898     }
00899   } 
00900 
00901 }

void DTLocalTriggerTask::setQLabels ( MonitorElement me,
short int  iaxis 
) [protected]

Set Quality labels.

Definition at line 1073 of file DTLocalTriggerTask.cc.

References MonitorElement::getTH1(), histo, i, and hlt_scaler_cfg::labels.

01073                                                                       {
01074 
01075   TH1* histo = me->getTH1();
01076   if (!histo) return;
01077   
01078   TAxis* axis=0;
01079   if (iaxis==1) {
01080     axis=histo->GetXaxis();
01081   }
01082   else if(iaxis==2) {
01083     axis=histo->GetYaxis();
01084   }
01085   if (!axis) return;
01086 
01087   char *labels[7] = {"LI","LO","HI","HO","LL","HL","HH"};
01088   int istart = axis->GetXmin()<-1 ? 2 : 1;
01089   for (int i=0;i<7;i++) {
01090     axis->SetBinLabel(i+istart,labels[i]);
01091   }
01092 
01093 }

std::string& DTLocalTriggerTask::topFolder (  )  [inline, protected]

Get the Top folder (different between Physics and TP).

Definition at line 106 of file DTLocalTriggerTask.h.

References baseFolder.

Referenced by endJob().

00106 { return baseFolder; }

void DTLocalTriggerTask::triggerSource ( const edm::Event e  )  [protected]

Get the L1A source.

Definition at line 1095 of file DTLocalTriggerTask.cc.

References edm::Event::getByType(), edm::ParameterSet::getUntrackedParameter(), i, int, and parameters.

Referenced by analyze().

01095                                                         {
01096   
01097   
01098   if ( !parameters.getUntrackedParameter<bool>("localrun", true) ){
01099     
01100     Handle<LTCDigiCollection> ltcdigis;
01101     e.getByType(ltcdigis);
01102     
01103     for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
01104       
01105       int otherTriggerSum=0;
01106       for (int i = 1; i < 6; i++) {
01107         otherTriggerSum += int((*ltc_it).HasTriggered(i));
01108       }
01109       if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0) 
01110         trigsrc = "_DTonly";
01111       else if (!(*ltc_it).HasTriggered(0))
01112         trigsrc = "_NoDT";
01113       else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
01114         trigsrc = "_DTalso";
01115       
01116     }
01117     return;
01118   }
01119 
01120   trigsrc = "";
01121   return;
01122 
01123 }


Friends And Related Function Documentation

friend class DTMonitorModule [friend]

Definition at line 45 of file DTLocalTriggerTask.h.


Member Data Documentation

std::string DTLocalTriggerTask::baseFolder [private]

Definition at line 114 of file DTLocalTriggerTask.h.

Referenced by DTLocalTriggerTask(), and topFolder().

DQMStore* DTLocalTriggerTask::dbe [private]

Definition at line 129 of file DTLocalTriggerTask.h.

Referenced by DTLocalTriggerTask(), and endJob().

MonitorElement* DTLocalTriggerTask::dcc_IDDataErrorPlot [private]

Definition at line 134 of file DTLocalTriggerTask.h.

Referenced by runDCCAnalysis().

int DTLocalTriggerTask::dduphcode_best[6][5][13] [private]

Definition at line 120 of file DTLocalTriggerTask.h.

Referenced by runDDUAnalysis(), and runSegmentAnalysis().

int DTLocalTriggerTask::dduthcode_best[6][5][13] [private]

Definition at line 122 of file DTLocalTriggerTask.h.

Referenced by runDDUAnalysis(), and runSegmentAnalysis().

bool DTLocalTriggerTask::detailedAnalysis [private]

Definition at line 116 of file DTLocalTriggerTask.h.

Referenced by beginJob(), DTLocalTriggerTask(), and runDCCAnalysis().

std::map<uint32_t, std::map<std::string, MonitorElement*> > DTLocalTriggerTask::digiHistos [private]

Definition at line 132 of file DTLocalTriggerTask.h.

Referenced by beginLuminosityBlock(), runDCCAnalysis(), runDDUAnalysis(), and runSegmentAnalysis().

bool DTLocalTriggerTask::doDCCTheta [private]

Definition at line 115 of file DTLocalTriggerTask.h.

Referenced by beginJob(), DTLocalTriggerTask(), and runDCCAnalysis().

const L1MuDTChambPhDigi* DTLocalTriggerTask::iphbest[6][5][13] [private]

Definition at line 124 of file DTLocalTriggerTask.h.

Referenced by runDCCAnalysis(), and runSegmentAnalysis().

const DTLocalTrigger* DTLocalTriggerTask::iphbestddu[6][5][13] [private]

Definition at line 125 of file DTLocalTriggerTask.h.

Referenced by runDDUAnalysis().

const L1MuDTChambThDigi* DTLocalTriggerTask::ithbest[6][5][13] [private]

Definition at line 126 of file DTLocalTriggerTask.h.

Referenced by runDCCAnalysis().

int DTLocalTriggerTask::mapDTTF[6][13][2] [private]

Definition at line 123 of file DTLocalTriggerTask.h.

edm::ESHandle<DTGeometry> DTLocalTriggerTask::muonGeom [private]

Definition at line 131 of file DTLocalTriggerTask.h.

Referenced by beginJob(), computeCoordinates(), phi2Pos(), and phiRange().

int DTLocalTriggerTask::nevents [private]

Definition at line 112 of file DTLocalTriggerTask.h.

Referenced by analyze(), beginJob(), endJob(), and ~DTLocalTriggerTask().

edm::ParameterSet DTLocalTriggerTask::parameters [private]

Definition at line 130 of file DTLocalTriggerTask.h.

Referenced by analyze(), beginJob(), beginLuminosityBlock(), DTLocalTriggerTask(), and triggerSource().

int DTLocalTriggerTask::phcode_best[6][5][13] [private]

Definition at line 119 of file DTLocalTriggerTask.h.

Referenced by runDCCAnalysis(), and runSegmentAnalysis().

int DTLocalTriggerTask::thcode_best[6][5][13] [private]

Definition at line 121 of file DTLocalTriggerTask.h.

Referenced by runDCCAnalysis(), and runSegmentAnalysis().

bool DTLocalTriggerTask::tpMode [private]

Definition at line 113 of file DTLocalTriggerTask.h.

Referenced by analyze(), beginJob(), DTLocalTriggerTask(), runDCCAnalysis(), and runDDUAnalysis().

bool DTLocalTriggerTask::track_ok[6][5][15] [private]

Definition at line 127 of file DTLocalTriggerTask.h.

Referenced by runSegmentAnalysis().

std::string DTLocalTriggerTask::trigsrc [private]

Definition at line 111 of file DTLocalTriggerTask.h.

Referenced by analyze(), runDCCAnalysis(), runDDUAnalysis(), and runSegmentAnalysis().

bool DTLocalTriggerTask::useDCC [private]

Definition at line 110 of file DTLocalTriggerTask.h.

Referenced by analyze(), and runSegmentAnalysis().

bool DTLocalTriggerTask::useDDU [private]

Definition at line 110 of file DTLocalTriggerTask.h.

Referenced by analyze(), and runSegmentAnalysis().

bool DTLocalTriggerTask::useSEG [private]

Definition at line 110 of file DTLocalTriggerTask.h.

Referenced by analyze().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:57 2009 for CMSSW by  doxygen 1.5.4