From 0eb0edf105cd05610fe6afd31825ead860530be4 Mon Sep 17 00:00:00 2001 From: Alessio Bonato Date: Fri, 2 Oct 2009 12:46:54 +0000 Subject: [PATCH] --- yaml --- r: 74601 b: "refs/heads/CMSSW_7_1_X" c: 21c0dbec14e3838de499541f47c619431aadfeb1 h: "refs/heads/CMSSW_7_1_X" i: 74599: 574c7788a7558fe0e41cd6f8dd4fff05a7548791 v: v3 --- [refs] | 2 +- .../CommonAlignmentProducer/BuildFile | 2 ++ .../plugins/AlignmentProducer.cc | 22 ++++++++++++++----- .../plugins/AlignmentProducer.h | 6 +++-- .../CommonAlignmentProducer/plugins/BuildFile | 4 +++- .../python/AlignmentProducer_cff.py | 1 + 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index b5c629b980c45..d29293074cb25 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e -"refs/heads/CMSSW_7_1_X": bb5f88c2990d1a500e3e2a002542c787b8ed2a40 +"refs/heads/CMSSW_7_1_X": 21c0dbec14e3838de499541f47c619431aadfeb1 diff --git a/trunk/Alignment/CommonAlignmentProducer/BuildFile b/trunk/Alignment/CommonAlignmentProducer/BuildFile index e2d73678d5367..750dadbf3dfc4 100644 --- a/trunk/Alignment/CommonAlignmentProducer/BuildFile +++ b/trunk/Alignment/CommonAlignmentProducer/BuildFile @@ -17,6 +17,8 @@ + + diff --git a/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.cc b/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.cc index 0f6e8f29faf34..cca33b069c2c7 100644 --- a/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.cc +++ b/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.cc @@ -1,8 +1,8 @@ /// \file AlignmentProducer.cc /// /// \author : Frederic Ronga -/// Revision : $Revision: 1.34 $ -/// last update: $Date: 2009/05/11 12:29:00 $ +/// Revision : $Revision: 1.35 $ +/// last update: $Date: 2009/06/23 10:02:58 $ /// by : $Author: flucke $ #include "AlignmentProducer.h" @@ -84,7 +84,8 @@ AlignmentProducer::AlignmentProducer(const edm::ParameterSet& iConfig) : useSurvey_( iConfig.getParameter("useSurvey") ), tjTkAssociationMapTag_(iConfig.getParameter("tjTkAssociationMapTag")), beamSpotTag_(iConfig.getParameter("beamSpotTag")), - tkLasBeamTag_(iConfig.getParameter("tkLasBeamTag")) + tkLasBeamTag_(iConfig.getParameter("tkLasBeamTag")), + hitVMTag_(iConfig.getParameter("HitPrescaleMap")) { edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::AlignmentProducer"; @@ -399,8 +400,19 @@ AlignmentProducer::duringLoop( const edm::Event& event, event.getByLabel(beamSpotTag_, beamSpot); // Run the alignment algorithm with its input - const AlignmentAlgorithmBase::EventInfo eventInfo(event.id(), trajTracks, *beamSpot); - theAlignmentAlgo->run(setup, eventInfo); + if(hitVMTag_.encode().size()){//check that the input tag is not empty + edm::Handle hitVM; + event.getByLabel(hitVMTag_, hitVM); + const AlignmentAlgorithmBase::EventInfo eventInfo(event.id(), trajTracks, *beamSpot, &(*hitVM)); + theAlignmentAlgo->run(setup, eventInfo ); + } + else{ + const AlignmentAlgorithmBase::EventInfo eventInfo(event.id(), trajTracks, *beamSpot, 0); + theAlignmentAlgo->run(setup, eventInfo ); + } + + // const AlignmentAlgorithmBase::EventInfo eventInfo(event.id(), trajTracks, *beamSpot); + // theAlignmentAlgo->run(setup, eventInfo); for (std::vector::const_iterator monitor = theMonitors.begin(); monitor != theMonitors.end(); ++monitor) { diff --git a/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h b/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h index a1020e012259b..c6581830cda3c 100644 --- a/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h +++ b/trunk/Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h @@ -7,8 +7,8 @@ /// Description : calls alignment algorithms /// /// \author : Frederic Ronga -/// Revision : $Revision: 1.14 $ -/// last update: $Date: 2009/05/11 09:31:38 $ +/// Revision : $Revision: 1.15 $ +/// last update: $Date: 2009/06/23 10:03:01 $ /// by : $Author: flucke $ #include @@ -160,6 +160,8 @@ class AlignmentProducer : public edm::ESProducerLooper const edm::InputTag tjTkAssociationMapTag_; // map with tracks/trajectories const edm::InputTag beamSpotTag_; // beam spot const edm::InputTag tkLasBeamTag_; // LAS beams in edm::Run (ignore if empty) + const edm::InputTag hitVMTag_; // ValueMap containing associtaion cluster - flag + // ESWatcher edm::ESWatcher watchTkSurveyRcd_; diff --git a/trunk/Alignment/CommonAlignmentProducer/plugins/BuildFile b/trunk/Alignment/CommonAlignmentProducer/plugins/BuildFile index 7bb68459df450..2f1b9848c6a81 100644 --- a/trunk/Alignment/CommonAlignmentProducer/plugins/BuildFile +++ b/trunk/Alignment/CommonAlignmentProducer/plugins/BuildFile @@ -2,6 +2,7 @@ + # One library for the 'fake' AlignmentProducers. # Do not put in same lib as AlignmentProducer since the latter # has many dependencies that should be avoided if only Fake is needed! @@ -35,7 +36,7 @@ - +# # one library for the selector modules @@ -52,3 +53,4 @@ + diff --git a/trunk/Alignment/CommonAlignmentProducer/python/AlignmentProducer_cff.py b/trunk/Alignment/CommonAlignmentProducer/python/AlignmentProducer_cff.py index 1186b3c2acc0e..7ac0c9a065898 100644 --- a/trunk/Alignment/CommonAlignmentProducer/python/AlignmentProducer_cff.py +++ b/trunk/Alignment/CommonAlignmentProducer/python/AlignmentProducer_cff.py @@ -42,6 +42,7 @@ beamSpotTag = cms.InputTag("offlineBeamSpot"), # run input tkLasBeamTag = cms.InputTag(""), # not used if empty + HitPrescaleMap = cms.InputTag(""), # not used if empty # Choose one algorithm with configuration, HIP is default algoConfig = cms.PSet(HIPAlignmentAlgorithm), # why not by reference?