CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

TrackingMonitor Class Reference

#include <DQM/TrackerMonitorTrack/src/TrackingMonitor.cc>

Inheritance diagram for TrackingMonitor:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob (void)
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &eSetup)
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
virtual void endJob (void)
virtual void endRun (const edm::Run &, const edm::EventSetup &)
virtual void setMaxMinBin (std::vector< double > &, std::vector< double > &, std::vector< int > &, double, double, int, double, double, int)
virtual void setNclus (const edm::Event &, std::vector< int > &)
 TrackingMonitor (const edm::ParameterSet &)
 ~TrackingMonitor ()

Private Member Functions

void doProfileX (TH2 *th2, MonitorElement *me)
void doProfileX (MonitorElement *th2m, MonitorElement *me)

Private Attributes

edm::InputTag bsSrc
std::string builderName
std::vector< std::string > ClusterLabels
edm::ParameterSet conf_
bool doAllPlots
bool doAllSeedPlots
bool doDCAPlots_
bool doGeneralPropertiesPlots_
bool doGoodTrackPlots_
bool doHitPropertiesPlots_
bool doLumiAnalysis
bool doPlotsVsBXlumi_
bool doPlotsVsGoodPVtx_
bool doProfilesVsLS_
bool doPUmonitoring_
bool doSeedNumberPlot
bool doSeedVsClusterPlot
bool doTkCandPlots
bool doTrackerSpecific_
DQMStoredqmStore_
MonitorElementFractionOfGoodTracks
MonitorElementFractionOfGoodTracksVsBXlumi
MonitorElementFractionOfGoodTracksVsGoodPVtx
GenericTriggerEventFlaggenTriggerEventFlag_
MonitorElementGoodTracksFractionVsLS
MonitorElementGoodTracksNumberOfRecHitsPerTrackVsLS
std::string histname
MonitorElementNumberOfGoodTracks
MonitorElementNumberOfGoodTracks_lumiFlag
MonitorElementNumberOfGoodTracksVsBXlumi
MonitorElementNumberOfGoodTracksVsGoodPVtx
MonitorElementNumberOfGoodTracksVsLS
MonitorElementNumberOfGoodTrkVsClus
MonitorElementNumberOfMeanLayersPerTrack
MonitorElementNumberOfMeanRecHitsPerTrack
MonitorElementNumberOfSeeds
MonitorElementNumberOfTrackCandidates
MonitorElementNumberOfTracks
MonitorElementNumberOfTracks_lumiFlag
MonitorElementNumberOfTracksVsBXlumi
MonitorElementNumberOfTracksVsGoodPVtx
MonitorElementNumberOfTracksVsLS
MonitorElementNumberOfTrkVsClus
std::vector< MonitorElement * > NumberOfTrkVsClusters
MonitorElementNumberOfTrkVsPixelClus
MonitorElementNumberOfTrkVsStripClus
edm::InputTag pvSrc
bool runTrackBuildingAnalyzerForSeed
std::vector< MonitorElement * > SeedsVsClusters
GetLumitheLumiDetails_
TrackAnalyzertheTrackAnalyzer
TrackBuildingAnalyzertheTrackBuildingAnalyzer
edm::ESHandle
< TransientTrackingRecHitBuilder
theTTRHBuilder
std::vector< VertexMonitor * > theVertexMonitor

Detailed Description

Monitoring source for general quantities related to tracks.

Definition at line 34 of file TrackingMonitor.h.


Constructor & Destructor Documentation

TrackingMonitor::TrackingMonitor ( const edm::ParameterSet iConfig) [explicit]

Definition at line 50 of file TrackingMonitor.cc.

References conf_, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, doPUmonitoring_, edm::ParameterSet::getParameter(), i, theLumiDetails_, and theVertexMonitor.

    : dqmStore_( edm::Service<DQMStore>().operator->() )
    , conf_ ( iConfig )
    , theTrackAnalyzer( new TrackAnalyzer(conf_) )
    , theTrackBuildingAnalyzer( new TrackBuildingAnalyzer(conf_) )
    , NumberOfTracks(NULL)
    , NumberOfMeanRecHitsPerTrack(NULL)
    , NumberOfMeanLayersPerTrack(NULL)
    , NumberOfGoodTracks(NULL)
    , FractionOfGoodTracks(NULL)
    , NumberOfSeeds(NULL)
    , NumberOfTrackCandidates(NULL)
                                // ADD by Mia
                                /*
    , NumberOfPixelClus(NULL)
    , NumberOfStripClus(NULL)
    , RatioOfPixelAndStripClus(NULL)
    , NumberOfTrkVsClus(NULL)
    , NumberOfTrkVsStripClus(NULL)
    , NumberOfTrkVsPixelClus(NULL)
                                */
    , NumberOfGoodTrkVsClus(NULL)
    , NumberOfTracksVsLS(NULL)
    , NumberOfGoodTracksVsLS(NULL)
    , GoodTracksFractionVsLS(NULL)
    , GoodTracksNumberOfRecHitsPerTrackVsLS(NULL)
                                // ADD by Mia for PU monitoring
                                // vertex plots to be moved in ad hoc class
    , NumberOfTracksVsGoodPVtx(NULL)
    , NumberOfTracksVsBXlumi(NULL)
    , NumberOfGoodTracksVsGoodPVtx(NULL)
    , NumberOfGoodTracksVsBXlumi(NULL)
    , FractionOfGoodTracksVsGoodPVtx(NULL)
    , FractionOfGoodTracksVsBXlumi(NULL)
                                // ADD by Mia in order to deal with LS transitions
    , NumberOfTracks_lumiFlag(NULL)
    , NumberOfGoodTracks_lumiFlag(NULL)

    , builderName              ( conf_.getParameter<std::string>("TTRHBuilder"))
    , doTrackerSpecific_       ( conf_.getParameter<bool>("doTrackerSpecific") )
    , doLumiAnalysis           ( conf_.getParameter<bool>("doLumiAnalysis"))
    , doProfilesVsLS_          ( conf_.getParameter<bool>("doProfilesVsLS"))
    , doAllPlots               ( conf_.getParameter<bool>("doAllPlots"))
    , doGeneralPropertiesPlots_( conf_.getParameter<bool>("doGeneralPropertiesPlots"))
    , doHitPropertiesPlots_    ( conf_.getParameter<bool>("doHitPropertiesPlots"))
    , doGoodTrackPlots_        ( conf_.getParameter<bool>("doGoodTrackPlots") )
    , doPUmonitoring_          ( conf_.getParameter<bool>("doPUmonitoring") )
    , genTriggerEventFlag_(new GenericTriggerEventFlag(iConfig))
{

  if ( doPUmonitoring_ ) {

    // get flag from the configuration
    doPlotsVsBXlumi_   = conf_.getParameter<bool>("doPlotsVsBXlumi");
    doPlotsVsGoodPVtx_ = conf_.getParameter<bool>("doPlotsVsGoodPVtx");

    if ( doPlotsVsBXlumi_ )
      theLumiDetails_ = new GetLumi( iConfig.getParameter<edm::ParameterSet>("BXlumiSetup") );

    std::vector<edm::InputTag> primaryVertexInputTags    = conf_.getParameter<std::vector<edm::InputTag> >("primaryVertexInputTags");
    std::vector<edm::InputTag> selPrimaryVertexInputTags = conf_.getParameter<std::vector<edm::InputTag> >("selPrimaryVertexInputTags");
    std::vector<std::string>   pvLabels                  = conf_.getParameter<std::vector<std::string> >  ("pvLabels");

    if (primaryVertexInputTags.size()==pvLabels.size() and primaryVertexInputTags.size()==selPrimaryVertexInputTags.size()) {
      for (size_t i=0; i<primaryVertexInputTags.size(); i++) {
        edm::InputTag iPVinputTag    = primaryVertexInputTags[i];
        edm::InputTag iSelPVinputTag = selPrimaryVertexInputTags[i];
        std::string   iPVlabel       = pvLabels[i];
        
        theVertexMonitor.push_back(new VertexMonitor(conf_,iPVinputTag,iSelPVinputTag,iPVlabel));
      }
    }
  }

}
TrackingMonitor::~TrackingMonitor ( )

Member Function Documentation

void TrackingMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 552 of file TrackingMonitor.cc.

References GenericTriggerEventFlag::accept(), TrackAnalyzer::analyze(), TrackBuildingAnalyzer::analyze(), bsSrc, builderName, ClusterLabels, compare_using_db::compare, conf_, doAllPlots, doAllSeedPlots, doGeneralPropertiesPlots_, doGoodTrackPlots_, doLumiAnalysis, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, doProfilesVsLS_, doPUmonitoring_, doSeedNumberPlot, doSeedVsClusterPlot, doTkCandPlots, doTrackerSpecific_, MonitorElement::Fill(), HcalObjRepresent::Fill(), cropTnPTrees::frac, FractionOfGoodTracks, FractionOfGoodTracksVsBXlumi, FractionOfGoodTracksVsGoodPVtx, genTriggerEventFlag_, edm::EventSetup::get(), edm::Event::getByLabel(), edm::ParameterSet::getParameter(), GetLumi::getValue(), GoodTracksFractionVsLS, GoodTracksNumberOfRecHitsPerTrackVsLS, reco::TrackBase::highPurity, i, edm::EventBase::id(), edm::HandleBase::isValid(), reco::TrackBase::loose, edm::EventID::luminosityBlock(), NumberOfGoodTracks, NumberOfGoodTracks_lumiFlag, NumberOfGoodTracksVsBXlumi, NumberOfGoodTracksVsGoodPVtx, NumberOfGoodTracksVsLS, NumberOfGoodTrkVsClus, NumberOfMeanLayersPerTrack, NumberOfMeanRecHitsPerTrack, NumberOfSeeds, NumberOfTrackCandidates, NumberOfTracks, NumberOfTracks_lumiFlag, NumberOfTracksVsBXlumi, NumberOfTracksVsGoodPVtx, NumberOfTracksVsLS, NumberOfTrkVsClusters, GenericTriggerEventFlag::on(), runTrackBuildingAnalyzerForSeed, SeedsVsClusters, setNclus(), edm::View< T >::size(), theLumiDetails_, theTrackAnalyzer, theTrackBuildingAnalyzer, theTTRHBuilder, theVertexMonitor, and reco::TrackBase::tight.

{
    // Filter out events if Trigger Filtering is requested
    if (genTriggerEventFlag_->on()&& ! genTriggerEventFlag_->accept( iEvent, iSetup) ) return;

    // input tags for collections from the configuration
    edm::InputTag trackProducer  = conf_.getParameter<edm::InputTag>("TrackProducer");
    edm::InputTag seedProducer   = conf_.getParameter<edm::InputTag>("SeedProducer");
    edm::InputTag tcProducer     = conf_.getParameter<edm::InputTag>("TCProducer");
    edm::InputTag bsSrc          = conf_.getParameter<edm::InputTag>("beamSpot");
    edm::InputTag pvSrc_         = conf_.getParameter<edm::InputTag>("primaryVertex");
    std::string Quality = conf_.getParameter<std::string>("Quality");
    std::string Algo    = conf_.getParameter<std::string>("AlgoName");

    //  Analyse the tracks
    //  if the collection is empty, do not fill anything
    // ---------------------------------------------------------------------------------//

    // get the track collection
    edm::Handle<reco::TrackCollection> trackHandle;
    iEvent.getByLabel(trackProducer, trackHandle);

    if (trackHandle.isValid()) 
    {

       reco::TrackCollection trackCollection = *trackHandle;
        // calculate the mean # rechits and layers
        int totalNumTracks = 0, totalRecHits = 0, totalLayers = 0;
        int totalNumHPTracks = 0, totalNumPt1Tracks = 0, totalNumHPPt1Tracks = 0;
        double frac = 0.;
        for (reco::TrackCollection::const_iterator track = trackCollection.begin(); track!=trackCollection.end(); ++track) 
        {

            if( track->quality(reco::TrackBase::highPurity) ) {
              ++totalNumHPTracks;
              if ( track->pt() >= 1. ) {
                ++totalNumHPPt1Tracks;
                if ( doProfilesVsLS_ || doAllPlots)
                  if ( doGoodTrackPlots_ || doAllPlots ) {
                    GoodTracksNumberOfRecHitsPerTrackVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),track->recHitsSize());
                  }
              }
            }
            
            if ( track->pt() >= 1. ) ++totalNumPt1Tracks;
        

            if( Quality == "highPurity") 
            {
                if( !track->quality(reco::TrackBase::highPurity) ) continue;
            }
            else if( Quality == "tight") 
            {
                if( !track->quality(reco::TrackBase::tight) ) continue;
            }
            else if( Quality == "loose") 
            {
                if( !track->quality(reco::TrackBase::loose) ) continue;
            }
            
            totalNumTracks++;
            totalRecHits    += track->numberOfValidHits();
            totalLayers     += track->hitPattern().trackerLayersWithMeasurement();

            // do analysis per track
            theTrackAnalyzer->analyze(iEvent, iSetup, *track);
        }

        if (totalNumPt1Tracks > 0) frac = static_cast<double>(totalNumHPPt1Tracks)/static_cast<double>(totalNumPt1Tracks);

        if (doGeneralPropertiesPlots_ || doAllPlots){
          NumberOfTracks       -> Fill(totalNumTracks);
          NumberOfGoodTracks   -> Fill(totalNumHPPt1Tracks);
          FractionOfGoodTracks -> Fill(frac);
        }

        if ( doProfilesVsLS_ || doAllPlots) {
          NumberOfTracksVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),totalNumTracks);
          if ( doGoodTrackPlots_ || doAllPlots ) {
            NumberOfGoodTracksVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),totalNumHPPt1Tracks);
            GoodTracksFractionVsLS->Fill(static_cast<double>(iEvent.id().luminosityBlock()),frac);
          }
        }

        if ( doLumiAnalysis ) {
          NumberOfTracks_lumiFlag       -> Fill(totalNumTracks);
          if ( doGoodTrackPlots_ )
            NumberOfGoodTracks_lumiFlag   -> Fill(totalNumHPPt1Tracks);
        }

        if (doGeneralPropertiesPlots_ || doAllPlots){
          if( totalNumTracks > 0 )
              {
                double meanRecHits = static_cast<double>(totalRecHits) / static_cast<double>(totalNumTracks);
                double meanLayers  = static_cast<double>(totalLayers)  / static_cast<double>(totalNumTracks);
                NumberOfMeanRecHitsPerTrack -> Fill(meanRecHits);
                NumberOfMeanLayersPerTrack  -> Fill(meanLayers);
              }
          }
    
        //  Analyse the Track Building variables 
        //  if the collection is empty, do not fill anything
        // ---------------------------------------------------------------------------------//
        
                            
            // fill the TrackCandidate info
            if (doTkCandPlots) 
              {
        
                // magnetic field
                edm::ESHandle<MagneticField> theMF;
                iSetup.get<IdealMagneticFieldRecord>().get(theMF);  
                
                // get the beam spot
                edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
                iEvent.getByLabel(bsSrc,recoBeamSpotHandle);
                const reco::BeamSpot& bs = *recoBeamSpotHandle;      
                
                // get the candidate collection
                edm::Handle<TrackCandidateCollection> theTCHandle;
                iEvent.getByLabel(tcProducer, theTCHandle ); 
                const TrackCandidateCollection& theTCCollection = *theTCHandle;

                if (theTCHandle.isValid())
                  {
                    NumberOfTrackCandidates->Fill(theTCCollection.size());
                    iSetup.get<TransientRecHitRecord>().get(builderName,theTTRHBuilder);
                    for( TrackCandidateCollection::const_iterator cand = theTCCollection.begin(); cand != theTCCollection.end(); ++cand)
                      {
                        theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *cand, bs, theMF, theTTRHBuilder);
                      }
                  }
                else
                  {
                    edm::LogWarning("TrackingMonitor") << "No Track Candidates in the event.  Not filling associated histograms";
                  }
              }
    
            //plots for trajectory seeds

            if (doAllSeedPlots || doSeedNumberPlot || doSeedVsClusterPlot || runTrackBuildingAnalyzerForSeed){
            
            // get the seed collection
            edm::Handle<edm::View<TrajectorySeed> > seedHandle;
            iEvent.getByLabel(seedProducer, seedHandle);
            const edm::View<TrajectorySeed>& seedCollection = *seedHandle;
            
            // fill the seed info
            if (seedHandle.isValid()) 
              {
                if(doAllSeedPlots || doSeedNumberPlot) NumberOfSeeds->Fill(seedCollection.size());

                if(doAllSeedPlots || doSeedVsClusterPlot){

                  std::vector<int> NClus;
                  setNclus(iEvent,NClus);
                  for (uint  i=0; i< ClusterLabels.size(); i++){
                    SeedsVsClusters[i]->Fill(NClus[i],seedCollection.size());
                  }
                }

                if (doAllSeedPlots || runTrackBuildingAnalyzerForSeed){

                  //here duplication of mag field and be informations is needed to allow seed and track cand histos to be independent
                  // magnetic field
                  edm::ESHandle<MagneticField> theMF;
                  iSetup.get<IdealMagneticFieldRecord>().get(theMF);  
                  
                  // get the beam spot
                  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
                  iEvent.getByLabel(bsSrc,recoBeamSpotHandle);
                  const reco::BeamSpot& bs = *recoBeamSpotHandle;      
                  
                  iSetup.get<TransientRecHitRecord>().get(builderName,theTTRHBuilder);
                  for(size_t i=0; i < seedHandle->size(); ++i)
                    {
                      edm::RefToBase<TrajectorySeed> seed(seedHandle, i);
                      theTrackBuildingAnalyzer->analyze(iEvent, iSetup, *seed, bs, theMF, theTTRHBuilder);
                    }
                }
                
              }
            else
              {
                edm::LogWarning("TrackingMonitor") << "No Trajectory seeds in the event.  Not filling associated histograms";
              }
            }


         if (doTrackerSpecific_ || doAllPlots) 
          {
            std::vector<int> NClus;
            setNclus(iEvent,NClus);
            for (uint  i=0; i< ClusterLabels.size(); i++){
              NumberOfTrkVsClusters[i]->Fill(NClus[i],totalNumTracks);
            }
            if ( doGoodTrackPlots_ || doAllPlots ) {
              for (uint  i=0; i< ClusterLabels.size(); i++){
                if(ClusterLabels[i].compare("Tot")==0){
                  NumberOfGoodTrkVsClus->Fill( NClus[i],totalNumHPPt1Tracks);
                }
              }
            }

            /*
            edm::Handle< edmNew::DetSetVector<SiStripCluster> > strip_clusters;
            iEvent.getByLabel("siStripClusters", strip_clusters);
            edm::Handle< edmNew::DetSetVector<SiPixelCluster> > pixel_clusters;
            iEvent.getByLabel("siPixelClusters", pixel_clusters);
            if (strip_clusters.isValid() && pixel_clusters.isValid()) 
              {
                unsigned int ncluster_pix   = (*pixel_clusters).dataSize(); 
                unsigned int ncluster_strip = (*strip_clusters).dataSize(); 
                double ratio = 0.0;
                if ( ncluster_pix > 0) ratio = atan(ncluster_pix*1.0/ncluster_strip);

                NumberOfStripClus->Fill(ncluster_strip);
                NumberOfPixelClus->Fill(ncluster_pix);
                RatioOfPixelAndStripClus->Fill(ratio);

                NumberOfTrkVsClus->Fill( ncluster_strip+ncluster_pix,totalNumTracks);
            
                if (doGoodTrackPlots_) {
                  NumberOfGoodTrkVsClus->Fill( ncluster_strip+ncluster_pix,totalNumHPPt1Tracks);
                }
              }
            */
          }

         if ( doPUmonitoring_ ) {
           
           // do vertex monitoring
           for (size_t i=0; i<theVertexMonitor.size(); i++)
             theVertexMonitor[i]->analyze(iEvent, iSetup);
           
           if ( doPlotsVsGoodPVtx_ ) {
             
             edm::InputTag primaryVertexInputTag = conf_.getParameter<edm::InputTag>("primaryVertex");
             
             size_t totalNumGoodPV = 0;
             edm::Handle< reco::VertexCollection > pvHandle;
             iEvent.getByLabel(primaryVertexInputTag, pvHandle );
             if (pvHandle.isValid())
               {
                 
                 for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
                      pv != pvHandle->end(); ++pv) {
                   
                   //--- pv fake (the pv collection should have size==1 and the pv==beam spot) 
                   if (pv->isFake() || pv->tracksSize()==0) continue;
                   
                   // definition of goodOfflinePrimaryVertex
                   if (pv->ndof() < 4. || pv->z() > 24.)  continue;
                   totalNumGoodPV++;
                 }
                 
                 NumberOfTracksVsGoodPVtx       -> Fill( totalNumGoodPV, totalNumTracks      );
                 NumberOfGoodTracksVsGoodPVtx   -> Fill( totalNumGoodPV, totalNumHPPt1Tracks );
                 FractionOfGoodTracksVsGoodPVtx -> Fill( totalNumGoodPV, frac                );
               }
           }
           
           if ( doPlotsVsBXlumi_ ) {
             
             double bxlumi = theLumiDetails_->getValue(iEvent);
             
             NumberOfTracksVsBXlumi       -> Fill( bxlumi, totalNumTracks      );
             NumberOfGoodTracksVsBXlumi   -> Fill( bxlumi, totalNumHPPt1Tracks );
             FractionOfGoodTracksVsBXlumi -> Fill( bxlumi, frac                );
           }
           
         }
         
    }

}
void TrackingMonitor::beginJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 138 of file TrackingMonitor.cc.

References TrackAnalyzer::beginJob(), TrackBuildingAnalyzer::beginJob(), DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookProfile(), ClusterLabels, compare_using_db::compare, conf_, doAllPlots, doAllSeedPlots, doGeneralPropertiesPlots_, doGoodTrackPlots_, doLumiAnalysis, doPlotsVsBXlumi_, doPlotsVsGoodPVtx_, doProfilesVsLS_, doPUmonitoring_, doSeedNumberPlot, doSeedVsClusterPlot, doTkCandPlots, doTrackerSpecific_, dqmStore_, FractionOfGoodTracks, FractionOfGoodTracksVsBXlumi, FractionOfGoodTracksVsGoodPVtx, edm::ParameterSet::getParameter(), MonitorElement::getTH1(), GoodTracksFractionVsLS, GoodTracksNumberOfRecHitsPerTrackVsLS, histname, i, edm::InputTag::label(), NumberOfGoodTracks, NumberOfGoodTracks_lumiFlag, NumberOfGoodTracksVsBXlumi, NumberOfGoodTracksVsGoodPVtx, NumberOfGoodTracksVsLS, NumberOfGoodTrkVsClus, NumberOfMeanLayersPerTrack, NumberOfMeanRecHitsPerTrack, NumberOfSeeds, NumberOfTrackCandidates, NumberOfTracks, NumberOfTracks_lumiFlag, NumberOfTracksVsBXlumi, NumberOfTracksVsGoodPVtx, NumberOfTracksVsLS, NumberOfTrkVsClusters, runTrackBuildingAnalyzerForSeed, SeedsVsClusters, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), TrackAnalyzer::setLumiFlag(), setMaxMinBin(), theTrackAnalyzer, theTrackBuildingAnalyzer, theVertexMonitor, and indexGen::title.

{

    // parameters from the configuration
    std::string Quality      = conf_.getParameter<std::string>("Quality");
    std::string AlgoName     = conf_.getParameter<std::string>("AlgoName");
    std::string MEFolderName = conf_.getParameter<std::string>("FolderName"); 

    // test for the Quality veriable validity
    if( Quality != "")
    {
        if( Quality != "highPurity" && Quality != "tight" && Quality != "loose") 
        {
            edm::LogWarning("TrackingMonitor")  << "Qualty Name is invalid, using no quality criterea by default";
            Quality = "";
        }
    }

    // use the AlgoName and Quality Name
    std::string CategoryName = Quality != "" ? AlgoName + "_" + Quality : AlgoName;

    // get binning from the configuration
    int    TKNoBin     = conf_.getParameter<int>(   "TkSizeBin");
    double TKNoMin     = conf_.getParameter<double>("TkSizeMin");
    double TKNoMax     = conf_.getParameter<double>("TkSizeMax");

    int    TCNoBin     = conf_.getParameter<int>(   "TCSizeBin");
    double TCNoMin     = conf_.getParameter<double>("TCSizeMin");
    double TCNoMax     = conf_.getParameter<double>("TCSizeMax");

    int    TKNoSeedBin = conf_.getParameter<int>(   "TkSeedSizeBin");
    double TKNoSeedMin = conf_.getParameter<double>("TkSeedSizeMin");
    double TKNoSeedMax = conf_.getParameter<double>("TkSeedSizeMax");

    int    MeanHitBin  = conf_.getParameter<int>(   "MeanHitBin");
    double MeanHitMin  = conf_.getParameter<double>("MeanHitMin");
    double MeanHitMax  = conf_.getParameter<double>("MeanHitMax");

    int    MeanLayBin  = conf_.getParameter<int>(   "MeanLayBin");
    double MeanLayMin  = conf_.getParameter<double>("MeanLayMin");
    double MeanLayMax  = conf_.getParameter<double>("MeanLayMax");

    int LSBin = conf_.getParameter<int>(   "LSBin");
    int LSMin = conf_.getParameter<double>("LSMin");
    int LSMax = conf_.getParameter<double>("LSMax");

    std::string StateName = conf_.getParameter<std::string>("MeasurementState");
    if
    (
        StateName != "OuterSurface" &&
        StateName != "InnerSurface" &&
        StateName != "ImpactPoint"  &&
        StateName != "default"      &&
        StateName != "All"
    )
    {
        // print warning
        edm::LogWarning("TrackingMonitor")  << "State Name is invalid, using 'ImpactPoint' by default";
    }

    dqmStore_->setCurrentFolder(MEFolderName);

    // book the General Property histograms
    // ---------------------------------------------------------------------------------//

    if (doGeneralPropertiesPlots_ || doAllPlots){
     
      dqmStore_->setCurrentFolder(MEFolderName+"/GeneralProperties");

      histname = "NumberOfTracks_" + CategoryName;
      // MODIFY by Mia in order to cope w/ high multiplicity
      //      NumberOfTracks = dqmStore_->book1D(histname, histname, TKNoBin, TKNoMin, TKNoMax);
      NumberOfTracks = dqmStore_->book1D(histname, histname, 3*TKNoBin, TKNoMin, (TKNoMax+0.5)*3.-0.5);
      NumberOfTracks->setAxisTitle("Number of Tracks per Event", 1);
      NumberOfTracks->setAxisTitle("Number of Events", 2);
      
      histname = "NumberOfMeanRecHitsPerTrack_" + CategoryName;
      NumberOfMeanRecHitsPerTrack = dqmStore_->book1D(histname, histname, MeanHitBin, MeanHitMin, MeanHitMax);
      NumberOfMeanRecHitsPerTrack->setAxisTitle("Mean number of found RecHits per Track", 1);
      NumberOfMeanRecHitsPerTrack->setAxisTitle("Entries", 2);
      
      histname = "NumberOfMeanLayersPerTrack_" + CategoryName;
      NumberOfMeanLayersPerTrack = dqmStore_->book1D(histname, histname, MeanLayBin, MeanLayMin, MeanLayMax);
      NumberOfMeanLayersPerTrack->setAxisTitle("Mean number of Layers per Track", 1);
      NumberOfMeanLayersPerTrack->setAxisTitle("Entries", 2);
      
      dqmStore_->setCurrentFolder(MEFolderName+"/GeneralProperties/GoodTracks");

      histname = "NumberOfGoodTracks_" + CategoryName;
      NumberOfGoodTracks = dqmStore_->book1D(histname, histname, TKNoBin, TKNoMin, TKNoMax);
      NumberOfGoodTracks->setAxisTitle("Number of Good Tracks per Event", 1);
      NumberOfGoodTracks->setAxisTitle("Number of Events", 2);
      
      histname = "FractionOfGoodTracks_" + CategoryName;
      FractionOfGoodTracks = dqmStore_->book1D(histname, histname, 101, -0.005, 1.005);
      FractionOfGoodTracks->setAxisTitle("Fraction of High Purity Tracks (Tracks with Pt>1GeV)", 1);
      FractionOfGoodTracks->setAxisTitle("Entries", 2);
    }

    if ( doLumiAnalysis ) {
      // add by Mia in order to deal with LS transitions
      dqmStore_->setCurrentFolder(MEFolderName+"/LSanalysis");

      histname = "NumberOfTracks_lumiFlag_" + CategoryName;
      NumberOfTracks_lumiFlag = dqmStore_->book1D(histname, histname, 3*TKNoBin, TKNoMin, (TKNoMax+0.5)*3.-0.5);
      NumberOfTracks_lumiFlag->setAxisTitle("Number of Tracks per Event", 1);
      NumberOfTracks_lumiFlag->setAxisTitle("Number of Events", 2);

      if ( doGoodTrackPlots_ ) {
        histname = "NumberOfGoodTracks_lumiFlag_" + CategoryName;
        NumberOfGoodTracks_lumiFlag = dqmStore_->book1D(histname, histname, TKNoBin, TKNoMin, TKNoMax);
        NumberOfGoodTracks_lumiFlag->setAxisTitle("Number of Good Tracks per Event", 1);
        NumberOfGoodTracks_lumiFlag->setAxisTitle("Number of Events", 2);
      }
      
    }

    // book profile plots vs LS :  
    //---------------------------  
   
 
    if ( doProfilesVsLS_ || doAllPlots) {

      dqmStore_->setCurrentFolder(MEFolderName+"/GeneralProperties");

      histname = "NumberOfTracksVsLS_"+ CategoryName;
      NumberOfTracksVsLS = dqmStore_->bookProfile(histname,histname, LSBin,LSMin,LSMax, TKNoMin, (TKNoMax+0.5)*3.-0.5,"");
      NumberOfTracksVsLS->getTH1()->SetBit(TH1::kCanRebin);
      NumberOfTracksVsLS->setAxisTitle("#Lumi section",1);
      NumberOfTracksVsLS->setAxisTitle("Number of  Tracks",2);

      if (doGoodTrackPlots_ || doAllPlots ){
        dqmStore_->setCurrentFolder(MEFolderName+"/GeneralProperties/GoodTracks");

        histname = "NumberOfGoodTracksVsLS_"+ CategoryName;
        NumberOfGoodTracksVsLS = dqmStore_->bookProfile(histname,histname, LSBin,LSMin,LSMax, TKNoMin, TKNoMax,"");
        NumberOfGoodTracksVsLS->getTH1()->SetBit(TH1::kCanRebin);
        NumberOfGoodTracksVsLS->setAxisTitle("#Lumi section",1);
        NumberOfGoodTracksVsLS->setAxisTitle("Number of Good Tracks",2);
        
        histname = "GoodTracksFractionVsLS_"+ CategoryName;
        GoodTracksFractionVsLS = dqmStore_->bookProfile(histname,histname, LSBin,LSMin,LSMax,0,1.1,"");
        GoodTracksFractionVsLS->getTH1()->SetBit(TH1::kCanRebin);
        GoodTracksFractionVsLS->setAxisTitle("#Lumi section",1);
        GoodTracksFractionVsLS->setAxisTitle("Fraction of Good Tracks",2);
        
        histname = "GoodTracksNumberOfRecHitsPerTrackVsLS_" + CategoryName;
        GoodTracksNumberOfRecHitsPerTrackVsLS = dqmStore_->bookProfile(histname,histname, LSBin,LSMin,LSMax,0.,40.,"");
        GoodTracksNumberOfRecHitsPerTrackVsLS->getTH1()->SetBit(TH1::kCanRebin);
        GoodTracksNumberOfRecHitsPerTrackVsLS->setAxisTitle("#Lumi section",1);
        GoodTracksNumberOfRecHitsPerTrackVsLS->setAxisTitle("Mean number of RecHits per Good track",2);
      }
    }

    // book PU monitoring plots :  
    //---------------------------  
   
    if ( doPUmonitoring_ ) {

      for (size_t i=0; i<theVertexMonitor.size(); i++)
        theVertexMonitor[i]->beginJob(dqmStore_);

      dqmStore_->setCurrentFolder(MEFolderName+"/PUmonitoring");
      
      if ( doPlotsVsGoodPVtx_ ) {
        // get binning from the configuration
        int    GoodPVtxBin   = conf_.getParameter<int>("GoodPVtxBin");
        double GoodPVtxMin   = conf_.getParameter<double>("GoodPVtxMin");
        double GoodPVtxMax   = conf_.getParameter<double>("GoodPVtxMax");

        histname = "NumberOfTracksVsGoodPVtx";
        NumberOfTracksVsGoodPVtx = dqmStore_->bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax,TKNoMin, (TKNoMax+0.5)*3.-0.5,"");
        NumberOfTracksVsGoodPVtx->getTH1()->SetBit(TH1::kCanRebin);
        NumberOfTracksVsGoodPVtx->setAxisTitle("Number of PV",1);
        NumberOfTracksVsGoodPVtx->setAxisTitle("Mean number of Tracks per Event",2);
      
        histname = "NumberOfGoodTracksVsGoodPVtx";
        NumberOfGoodTracksVsGoodPVtx = dqmStore_->bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax, TKNoMin, TKNoMax,"");
        NumberOfGoodTracksVsGoodPVtx->getTH1()->SetBit(TH1::kCanRebin);
        NumberOfGoodTracksVsGoodPVtx->setAxisTitle("Number of PV",1);
        NumberOfGoodTracksVsGoodPVtx->setAxisTitle("Mean number of Good Tracks per Event",2);

        histname = "FractionOfGoodTracksVsGoodPVtx";
        FractionOfGoodTracksVsGoodPVtx = dqmStore_->bookProfile(histname,histname,GoodPVtxBin,GoodPVtxMin,GoodPVtxMax, TKNoMin, TKNoMax,"");
        FractionOfGoodTracksVsGoodPVtx->getTH1()->SetBit(TH1::kCanRebin);
        FractionOfGoodTracksVsGoodPVtx->setAxisTitle("Number of PV",1);
        FractionOfGoodTracksVsGoodPVtx->setAxisTitle("Mean fraction of Good Tracks per Event",2);
      }
      
      if ( doPlotsVsBXlumi_ ) {
        // get binning from the configuration
        edm::ParameterSet BXlumiParameters = conf_.getParameter<edm::ParameterSet>("BXlumiSetup");
        int    BXlumiBin   = BXlumiParameters.getParameter<int>("BXlumiBin");
        double BXlumiMin   = BXlumiParameters.getParameter<double>("BXlumiMin");
        double BXlumiMax   = BXlumiParameters.getParameter<double>("BXlumiMax");
      
        histname = "NumberOfTracksVsBXlumi_"+ CategoryName;
        NumberOfTracksVsBXlumi = dqmStore_->bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax, TKNoMin, TKNoMax,"");
        NumberOfTracksVsBXlumi->getTH1()->SetBit(TH1::kCanRebin);
        NumberOfTracksVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
        NumberOfTracksVsBXlumi->setAxisTitle("Mean number of Good Tracks",2);

        histname = "NumberOfGoodTracksVsBXlumi_"+ CategoryName;
        NumberOfGoodTracksVsBXlumi = dqmStore_->bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax, TKNoMin, TKNoMax,"");
        NumberOfGoodTracksVsBXlumi->getTH1()->SetBit(TH1::kCanRebin);
        NumberOfGoodTracksVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
        NumberOfGoodTracksVsBXlumi->setAxisTitle("Mean number of Good Tracks",2);
      
        histname = "FractionOfGoodTracksVsBXlumi_"+ CategoryName;
        FractionOfGoodTracksVsBXlumi = dqmStore_->bookProfile(histname,histname, BXlumiBin,BXlumiMin,BXlumiMax, TKNoMin, TKNoMax,"");
        FractionOfGoodTracksVsBXlumi->getTH1()->SetBit(TH1::kCanRebin);
        FractionOfGoodTracksVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]",1);
        FractionOfGoodTracksVsBXlumi->setAxisTitle("Mean fraction of Good Tracks",2);
      
      }
    }

    theTrackAnalyzer->beginJob(dqmStore_);

    // book the Seed Property histograms
    // ---------------------------------------------------------------------------------//

    dqmStore_->setCurrentFolder(MEFolderName+"/TrackBuilding");

    doAllSeedPlots=conf_.getParameter<bool>("doSeedParameterHistos");
    doSeedNumberPlot=conf_.getParameter<bool>("doSeedNumberHisto");
    doSeedVsClusterPlot=conf_.getParameter<bool>("doSeedVsClusterHisto");
    //    if (doAllPlots) doAllSeedPlots=true;

    runTrackBuildingAnalyzerForSeed=(doAllSeedPlots || conf_.getParameter<bool>("doSeedPTHisto") ||conf_.getParameter<bool>("doSeedETAHisto") || conf_.getParameter<bool>("doSeedPHIHisto") || conf_.getParameter<bool>("doSeedPHIVsETAHisto") || conf_.getParameter<bool>("doSeedThetaHisto") || conf_.getParameter<bool>("doSeedQHisto") || conf_.getParameter<bool>("doSeedDxyHisto") || conf_.getParameter<bool>("doSeedDzHisto") || conf_.getParameter<bool>("doSeedNRecHitsHisto") || conf_.getParameter<bool>("doSeedNVsPhiProf")|| conf_.getParameter<bool>("doSeedNVsEtaProf"));

    edm::InputTag seedProducer   = conf_.getParameter<edm::InputTag>("SeedProducer");

    if (doAllSeedPlots || doSeedNumberPlot){
      histname = "NumberOfSeeds_"+ seedProducer.label() + "_"+ CategoryName;
      NumberOfSeeds = dqmStore_->book1D(histname, histname, TKNoSeedBin, TKNoSeedMin, TKNoSeedMax);
      NumberOfSeeds->setAxisTitle("Number of Seeds per Event", 1);
      NumberOfSeeds->setAxisTitle("Number of Events", 2);
    }

    if (doAllSeedPlots || doSeedVsClusterPlot){

      ClusterLabels=  conf_.getParameter<std::vector<std::string> >("ClusterLabels");

      std::vector<double> histoMin,histoMax;
      std::vector<int> histoBin; //these vectors are for max min and nbins in histograms 

      int    NClusPxBin  = conf_.getParameter<int>(   "NClusPxBin");
      double NClusPxMin  = conf_.getParameter<double>("NClusPxMin");
      double NClusPxMax = conf_.getParameter<double>("NClusPxMax");
      
      int    NClusStrBin = conf_.getParameter<int>(   "NClusStrBin");
      double NClusStrMin = conf_.getParameter<double>("NClusStrMin");
      double NClusStrMax = conf_.getParameter<double>("NClusStrMax");

      setMaxMinBin(histoMin,histoMax,histoBin,NClusStrMin,NClusStrMax,NClusStrBin,NClusPxMin,NClusPxMax,NClusPxBin);
     
      for (uint i=0; i<ClusterLabels.size(); i++){
        histname = "SeedsVsClusters_" + seedProducer.label() + "_Vs_" + ClusterLabels[i] + "_" + CategoryName;
        SeedsVsClusters.push_back(dynamic_cast<MonitorElement*>(dqmStore_->book2D(histname, histname, histoBin[i], histoMin[i], histoMax[i],
                                                                                  TKNoSeedBin, TKNoSeedMin, TKNoSeedMax)));
        SeedsVsClusters[i]->setAxisTitle("Number of Clusters", 1);
        SeedsVsClusters[i]->setAxisTitle("Number of Seeds", 2);
      }
    }
    

    doTkCandPlots=conf_.getParameter<bool>("doTrackCandHistos");
    //    if (doAllPlots) doTkCandPlots=true;

    if (doTkCandPlots){

      edm::InputTag tcProducer     = conf_.getParameter<edm::InputTag>("TCProducer");

      histname = "NumberOfTrackCandidates_"+ tcProducer.label() + "_"+ CategoryName;
      NumberOfTrackCandidates = dqmStore_->book1D(histname, histname, TCNoBin, TCNoMin, TCNoMax);
      NumberOfTrackCandidates->setAxisTitle("Number of Track Candidates per Event", 1);
      NumberOfTrackCandidates->setAxisTitle("Number of Event", 2);
    }

   
    theTrackBuildingAnalyzer->beginJob(dqmStore_);
    

    if (doLumiAnalysis) {
//      if (NumberOfTracks) NumberOfTracks->setLumiFlag();
//      if (NumberOfGoodTracks) NumberOfGoodTracks->setLumiFlag();
//      if (FractionOfGoodTracks) FractionOfGoodTracks->setLumiFlag();
      if ( NumberOfTracks_lumiFlag       ) NumberOfTracks_lumiFlag       -> setLumiFlag();
      if ( NumberOfGoodTracks_lumiFlag   ) NumberOfGoodTracks_lumiFlag   -> setLumiFlag();
      theTrackAnalyzer->setLumiFlag();    
    }

    if (doTrackerSpecific_ || doAllPlots) {

      ClusterLabels=  conf_.getParameter<std::vector<std::string> >("ClusterLabels");

      std::vector<double> histoMin,histoMax;
      std::vector<int> histoBin; //these vectors are for max min and nbins in histograms 

      /*
      int    NClusPxBin  = conf_.getParameter<int>(   "NClusPxBin");
      double NClusPxMin  = conf_.getParameter<double>("NClusPxMin");
      double NClusPxMax = conf_.getParameter<double>("NClusPxMax");
      
      int    NClusStrBin = conf_.getParameter<int>(   "NClusStrBin");
      double NClusStrMin = conf_.getParameter<double>("NClusStrMin");
      double NClusStrMax = conf_.getParameter<double>("NClusStrMax");
      */

      /*
      int    NClus2DTotBin = conf_.getParameter<int>(   "NClus2DTotBin");
      double NClus2DTotMin = conf_.getParameter<double>("NClus2DTotMin");
      double NClus2DTotMax = conf_.getParameter<double>("NClus2DTotMax");
      */

      int    NClusStrBin = conf_.getParameter<int>(   "NClusStrBin");
      double NClusStrMin = conf_.getParameter<double>("NClusStrMin");
      double NClusStrMax = conf_.getParameter<double>("NClusStrMax");

      int    NClusPxBin = conf_.getParameter<int>(   "NClusPxBin");
      double NClusPxMin = conf_.getParameter<double>("NClusPxMin");
      double NClusPxMax = conf_.getParameter<double>("NClusPxMax");

      int    NTrk2DBin     = conf_.getParameter<int>(   "NTrk2DBin");
      double NTrk2DMin     = conf_.getParameter<double>("NTrk2DMin");
      double NTrk2DMax     = conf_.getParameter<double>("NTrk2DMax");

      //      setMaxMinBin(histoMin,histoMax,histoBin,NClusStrMin,NClusStrMax,NClusStrBin,NClusPxMin,NClusPxMax,NClusPxBin);
      setMaxMinBin(histoMin,histoMax,histoBin,
                   NClusStrMin,NClusStrMax,NClusStrBin,
                   NClusPxMin,  NClusPxMax,  NClusPxBin);
     
      /*
      int    NClusPxBin  = conf_.getParameter<int>(   "NClusPxBin");
      double NClusPxMin  = conf_.getParameter<double>("NClusPxMin");
      double NClusPxMax = conf_.getParameter<double>("NClusPxMax");

      int    NClusStrBin = conf_.getParameter<int>(   "NClusStrBin");
      double NClusStrMin = conf_.getParameter<double>("NClusStrMin");
      double NClusStrMax = conf_.getParameter<double>("NClusStrMax");
      */

      dqmStore_->setCurrentFolder(MEFolderName+"/HitProperties");

      for (uint i=0; i<ClusterLabels.size(); i++){

        dqmStore_->setCurrentFolder(MEFolderName+"/HitProperties");
        histname = "TracksVs" + ClusterLabels[i] + "Cluster_" + CategoryName;
        NumberOfTrkVsClusters.push_back(dynamic_cast<MonitorElement*>(dqmStore_->book2D(histname, histname,
                                                                                        histoBin[i], histoMin[i], histoMax[i],
                                                                                        NTrk2DBin,NTrk2DMin,NTrk2DMax
                                                                                        )));
        std::string title = "Number of " + ClusterLabels[i] + " Clusters";
        NumberOfTrkVsClusters[i]->setAxisTitle(title, 1);
        NumberOfTrkVsClusters[i]->setAxisTitle("Number of Seeds", 2);

        if (doGoodTrackPlots_ || doAllPlots ) {

          dqmStore_->setCurrentFolder(MEFolderName+"/HitProperties/GoodTracks");

          if(ClusterLabels[i].compare("Tot")==0){
            histname = "GoodTracksVs" + ClusterLabels[i] + "Cluster_" + CategoryName; 
            NumberOfGoodTrkVsClus = dqmStore_->book2D(histname,histname,
                                                      histoBin[i], histoMin[i], histoMax[i],
                                                      TKNoBin,TKNoMin,TKNoMax
                                                      );
            NumberOfGoodTrkVsClus->setAxisTitle("# of Clusters in (Pixel+Strip) Detectors", 1);
            NumberOfGoodTrkVsClus->setAxisTitle("Number of Good Tracks", 2);
          }
        }
      }

      /*
      histname = "TracksVsClusters_" + CategoryName; 
      NumberOfTrkVsClus = dqmStore_->book2D(histname,histname,
                                            NClus2DTotBin,NClus2DTotMin,NClus2DTotMax,
                                            NTrk2DBin,NTrk2DMin,NTrk2DMax
                                            );
      NumberOfTrkVsClus->setAxisTitle("# of Clusters in (Pixel+Strip) Detectors", 1);
      NumberOfTrkVsClus->setAxisTitle("Number of Tracks", 2);
      */
    }

    
}
void TrackingMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup eSetup 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 536 of file TrackingMonitor.cc.

References doGoodTrackPlots_, doLumiAnalysis, TrackAnalyzer::doReset(), dqmStore_, NumberOfGoodTracks_lumiFlag, NumberOfTracks_lumiFlag, HcalObjRepresent::Reset(), and theTrackAnalyzer.

                                                                                                       {

  if (doLumiAnalysis) {
//    dqmStore_->softReset(NumberOfTracks);
//    dqmStore_->softReset(NumberOfGoodTracks);
//    dqmStore_->softReset(FractionOfGoodTracks);
//    theTrackAnalyzer->doSoftReset(dqmStore_);    
    if ( NumberOfTracks_lumiFlag       ) NumberOfTracks_lumiFlag       -> Reset();
    if ( doGoodTrackPlots_ )
      if ( NumberOfGoodTracks_lumiFlag   ) NumberOfGoodTracks_lumiFlag   -> Reset();
    theTrackAnalyzer->doReset(dqmStore_);    
  }
}
void TrackingMonitor::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 527 of file TrackingMonitor.cc.

References genTriggerEventFlag_, GenericTriggerEventFlag::initRun(), and GenericTriggerEventFlag::on().

{
 
  // Initialize the GenericTriggerEventFlag
  if ( genTriggerEventFlag_->on() ) genTriggerEventFlag_->initRun( iRun, iSetup );
}
void TrackingMonitor::doProfileX ( TH2 *  th2,
MonitorElement me 
) [private]
void TrackingMonitor::doProfileX ( MonitorElement th2m,
MonitorElement me 
) [private]
void TrackingMonitor::endJob ( void  ) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 843 of file TrackingMonitor.cc.

References conf_, dqmStore_, edm::ParameterSet::getParameter(), dumpDBToFile_GT_ttrig_cfg::outputFileName, DQMStore::save(), and DQMStore::showDirStructure().

{
    bool outputMEsInRootFile   = conf_.getParameter<bool>("OutputMEsInRootFile");
    std::string outputFileName = conf_.getParameter<std::string>("OutputFileName");
    if(outputMEsInRootFile)
    {
        dqmStore_->showDirStructure();
        dqmStore_->save(outputFileName);
    }
}
void TrackingMonitor::endRun ( const edm::Run ,
const edm::EventSetup  
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 830 of file TrackingMonitor.cc.

References doLumiAnalysis.

{
  if (doLumiAnalysis) {
    /*
    dqmStore_->disableSoftReset(NumberOfTracks);
    dqmStore_->disableSoftReset(NumberOfGoodTracks);
    dqmStore_->disableSoftReset(FractionOfGoodTracks);
    theTrackAnalyzer->undoSoftReset(dqmStore_);    
    */
  }
  
}
void TrackingMonitor::setMaxMinBin ( std::vector< double > &  arrayMin,
std::vector< double > &  arrayMax,
std::vector< int > &  arrayBin,
double  smin,
double  smax,
int  sbin,
double  pmin,
double  pmax,
int  pbin 
) [virtual]

Definition at line 854 of file TrackingMonitor.cc.

References ClusterLabels, compare_using_db::compare, and i.

Referenced by beginJob().

{
  arrayMin.resize(ClusterLabels.size());
  arrayMax.resize(ClusterLabels.size());
  arrayBin.resize(ClusterLabels.size());

  for (uint i=0; i<ClusterLabels.size(); ++i){

    if (ClusterLabels[i].compare("Pix")==0) {arrayMin[i]=pmin; arrayMax[i]=pmax; arrayBin[i]=pbin;}
    else if(ClusterLabels[i].compare("Strip")==0){arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;}
    else if(ClusterLabels[i].compare("Tot")==0){arrayMin[i]=smin; arrayMax[i]=smax+pmax; arrayBin[i]=sbin;}
    else {edm::LogWarning("TrackingMonitor")  << "Cluster Label " << ClusterLabels[i] << " not defined, using strip parameters "; 
      arrayMin[i]=smin; arrayMax[i]=smax; arrayBin[i]=sbin;}

  }
    
}
void TrackingMonitor::setNclus ( const edm::Event iEvent,
std::vector< int > &  arrayNclus 
) [virtual]

Definition at line 872 of file TrackingMonitor.cc.

References ClusterLabels, compare_using_db::compare, edm::Event::getByLabel(), i, and edm::HandleBase::isValid().

Referenced by analyze().

{

  int ncluster_pix=-1;
  int ncluster_strip=-1;

  edm::Handle< edmNew::DetSetVector<SiStripCluster> > strip_clusters;
  iEvent.getByLabel("siStripClusters", strip_clusters);
  edm::Handle< edmNew::DetSetVector<SiPixelCluster> > pixel_clusters;
  iEvent.getByLabel("siPixelClusters", pixel_clusters);

  if (strip_clusters.isValid() && pixel_clusters.isValid()) 
    {
                ncluster_pix   = (*pixel_clusters).dataSize(); 
                ncluster_strip = (*strip_clusters).dataSize(); 
    }

  arrayNclus.resize(ClusterLabels.size());
  for (uint i=0; i<ClusterLabels.size(); ++i){

    if (ClusterLabels[i].compare("Pix")==0) arrayNclus[i]=ncluster_pix ;
    else if(ClusterLabels[i].compare("Strip")==0) arrayNclus[i]=ncluster_strip;
    else if(ClusterLabels[i].compare("Tot")==0)arrayNclus[i]=ncluster_pix+ncluster_strip;
    else {edm::LogWarning("TrackingMonitor") << "Cluster Label " << ClusterLabels[i] << " not defined using stri parametrs ";
      arrayNclus[i]=ncluster_strip ;}
  }
    
}

Member Data Documentation

Definition at line 63 of file TrackingMonitor.h.

Referenced by analyze().

std::string TrackingMonitor::builderName [private]

Definition at line 119 of file TrackingMonitor.h.

Referenced by analyze().

std::vector<std::string> TrackingMonitor::ClusterLabels [private]

Definition at line 83 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), setMaxMinBin(), and setNclus().

Definition at line 60 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), endJob(), and TrackingMonitor().

Definition at line 126 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 125 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 127 of file TrackingMonitor.h.

Definition at line 128 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 135 of file TrackingMonitor.h.

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

Definition at line 129 of file TrackingMonitor.h.

Definition at line 123 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), beginLuminosityBlock(), and endRun().

Definition at line 137 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), and TrackingMonitor().

Definition at line 138 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), and TrackingMonitor().

Definition at line 124 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 136 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), TrackingMonitor(), and ~TrackingMonitor().

Definition at line 131 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 132 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 130 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 122 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 59 of file TrackingMonitor.h.

Referenced by beginJob(), beginLuminosityBlock(), and endJob().

Definition at line 78 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 113 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 112 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 140 of file TrackingMonitor.h.

Referenced by analyze(), beginRun(), and ~TrackingMonitor().

Definition at line 104 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 105 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

std::string TrackingMonitor::histname [private]

Definition at line 57 of file TrackingMonitor.h.

Referenced by beginJob().

Definition at line 77 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 117 of file TrackingMonitor.h.

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

Definition at line 111 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 110 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 103 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 99 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 74 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 73 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 81 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 87 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 72 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 116 of file TrackingMonitor.h.

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

Definition at line 109 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 108 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 102 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 96 of file TrackingMonitor.h.

Definition at line 95 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 98 of file TrackingMonitor.h.

Definition at line 97 of file TrackingMonitor.h.

Definition at line 64 of file TrackingMonitor.h.

Definition at line 133 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 82 of file TrackingMonitor.h.

Referenced by analyze(), and beginJob().

Definition at line 69 of file TrackingMonitor.h.

Referenced by analyze(), and TrackingMonitor().

Definition at line 66 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), beginLuminosityBlock(), and ~TrackingMonitor().

Definition at line 67 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), and ~TrackingMonitor().

Definition at line 120 of file TrackingMonitor.h.

Referenced by analyze().

Definition at line 68 of file TrackingMonitor.h.

Referenced by analyze(), beginJob(), TrackingMonitor(), and ~TrackingMonitor().