Skip to content

Commit

Permalink
Change in AlignmentProducer for dealing with the new ClusterFlag (for…
Browse files Browse the repository at this point in the history
… Skim and Prescale alignment workflow)
  • Loading branch information
Alessio Bonato committed Oct 2, 2009
1 parent bb5f88c commit 21c0dbe
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Alignment/CommonAlignmentProducer/BuildFile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<use name=FWCore/Framework>
<use name=FWCore/Utilities>
<use name=FWCore/ParameterSet>
<use name=DataFormats/Alignment>
<use name=DataFormats/LaserAlignment>
<use name=rootcore>
<use name=root>
<export>
Expand Down
22 changes: 17 additions & 5 deletions Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.cc
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -84,7 +84,8 @@ AlignmentProducer::AlignmentProducer(const edm::ParameterSet& iConfig) :
useSurvey_( iConfig.getParameter<bool>("useSurvey") ),
tjTkAssociationMapTag_(iConfig.getParameter<edm::InputTag>("tjTkAssociationMapTag")),
beamSpotTag_(iConfig.getParameter<edm::InputTag>("beamSpotTag")),
tkLasBeamTag_(iConfig.getParameter<edm::InputTag>("tkLasBeamTag"))
tkLasBeamTag_(iConfig.getParameter<edm::InputTag>("tkLasBeamTag")),
hitVMTag_(iConfig.getParameter<edm::InputTag>("HitPrescaleMap"))
{

edm::LogInfo("Alignment") << "@SUB=AlignmentProducer::AlignmentProducer";
Expand Down Expand Up @@ -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<AliClusterValueMap> 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<AlignmentMonitorBase*>::const_iterator monitor = theMonitors.begin();
monitor != theMonitors.end(); ++monitor) {
Expand Down
6 changes: 4 additions & 2 deletions Alignment/CommonAlignmentProducer/plugins/AlignmentProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <vector>
Expand Down Expand Up @@ -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<TrackerSurveyRcd> watchTkSurveyRcd_;
Expand Down
4 changes: 3 additions & 1 deletion Alignment/CommonAlignmentProducer/plugins/BuildFile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<use name=FWCore/Framework>
<use name=FWCore/ParameterSet>


# 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!
Expand Down Expand Up @@ -35,7 +36,7 @@
<use name=TrackingTools/PatternTools>
<use name=boost>
</library>

#

# one library for the selector modules
<library name=CommonAlignmentProducerSelectors file=Alignment*SelectorModule.cc,AlignmentMuonHIPTrajectorySelector.cc>
Expand All @@ -52,3 +53,4 @@
<use name=TrackingTools/TransientTrackingRecHit>
<use name=root>
</library>

Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 21c0dbe

Please sign in to comment.