Skip to content

Commit

Permalink
Merge branch 'cms-sw:master' into mtd_sigmatof_1400pre3
Browse files Browse the repository at this point in the history
  • Loading branch information
noepalm authored Feb 8, 2024
2 parents 0590269 + 93f14ae commit b3af544
Show file tree
Hide file tree
Showing 1,981 changed files with 160,951 additions and 89,355 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ __init__.py
*.rej
*.orig


# ignore files under the top level $CMSSW_BASE/src directory, but not its subdirectories
/*
!/*/

# ignore some IDE related files
*.xcodeproj
.vscode

#ignore mac specific file
.DS_Store
6 changes: 4 additions & 2 deletions Alignment/CocoaFit/src/Fit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1210,8 +1210,9 @@ void Fit::dumpFittedValues(ALIFileOut& fileout, ALIbool printErrors, ALIbool pri
// const Entry* entry;
int ii, siz;
std::vector<OpticalObject*>::const_iterator vocite;
ALIstring sys = ALIstring("system");
for (vocite = Model::OptOList().begin(); vocite != Model::OptOList().end(); ++vocite) {
if ((*vocite)->type() == ALIstring("system"))
if ((*vocite)->type() == sys)
continue;

fileout << " %%%% Optical Object: " << (*vocite)->longName() << std::endl;
Expand Down Expand Up @@ -1268,8 +1269,9 @@ void Fit::dumpFittedValuesInAllAncestorFrames(ALIFileOut& fileout, ALIbool print
//---------- Iterate over OptO list
std::vector<Entry*> entries;
std::vector<OpticalObject*>::const_iterator vocite;
ALIstring sys = ALIstring("system");
for (vocite = Model::OptOList().begin(); vocite != Model::OptOList().end(); ++vocite) {
if ((*vocite)->type() == ALIstring("system"))
if ((*vocite)->type() == sys)
continue;

fileout << " %%%% Optical Object: " << (*vocite)->longName() << std::endl;
Expand Down
5 changes: 2 additions & 3 deletions Alignment/CocoaToDDL/src/UnitConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include "Alignment/CocoaToDDL/interface/CocoaUnitsTable.h"
#include "CLHEP/Units/GlobalSystemOfUnits.h"
#include <sstream>
#include <strstream>

/*
UnitConverter::UnitConverter(const G4BestUnit & bu)
Expand All @@ -23,7 +22,7 @@ UnitConverter::UnitConverter(ALIdouble val, const ALIstring& category)
UnitConverter::~UnitConverter() { delete bu_; }

std::string UnitConverter::ucstring() {
std::ostrstream str;
std::ostringstream str;

if (angl_) {
str.precision(11);
Expand All @@ -42,7 +41,7 @@ std::string UnitConverter::ucstring() {
/*
ostream & operator<<(ostream & os, const UnitConverter & uc)
{
ostrstream temp;
std::ostringstream temp;
//temp << uc.bu_;
//temp << '\0';
//string s(temp.str());
Expand Down
5 changes: 2 additions & 3 deletions Alignment/CocoaUtilities/src/ALIFileIn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#include "Alignment/CocoaUtilities/interface/ALIFileIn.h"

#include <cstdlib>
#include <strstream>
//#include <strstream.h>
#include <sstream>

//#include <algo.h>

Expand Down Expand Up @@ -112,7 +111,7 @@ ALIint ALIFileIn::getWordsInLine(std::vector<ALIstring>& wordlist) {
}

//---------- Convert line read to istrstream to split it in words
std::istrstream istr_line(ltemp);
std::istringstream istr_line(ltemp);

//--------- count how many words are there in ltemp (this sohuld not be needed, but sun compiler has problems) !! this has to be nvestigated...
ALIint NoWords = 0;
Expand Down
2 changes: 1 addition & 1 deletion Alignment/CocoaUtilities/src/ALIFileOut.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "Alignment/CocoaUtilities/interface/ALIFileOut.h"

#include <cstdlib>
#include <strstream>
#include <sstream>

std::vector<ALIFileOut*> ALIFileOut::theInstances;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#ifndef Alignment_CommonAlignmentAlgorithm_AlignmentTrackFromVertexCompositeCandidateSelector_h
#define Alignment_CommonAlignmentAlgorithm_AlignmentTrackFromVertexCompositeCandidateSelector_h

#include "DataFormats/TrackReco/interface/Track.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "DataFormats/Candidate/interface/VertexCompositeCandidate.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include <vector>

namespace edm {
class Event;
class ParameterSet;
} // namespace edm

class TrackingRecHit;

class AlignmentTrackFromVertexCompositeCandidateSelector {
public:
typedef std::vector<const reco::Track*> Tracks;

/// constructor
AlignmentTrackFromVertexCompositeCandidateSelector(const edm::ParameterSet& cfg, edm::ConsumesCollector& iC);

/// destructor
~AlignmentTrackFromVertexCompositeCandidateSelector();

/// select tracks
Tracks select(const edm::Handle<reco::TrackCollection>& tc,
const edm::Event& evt,
const edm::EventSetup& setup) const;

private:
const edm::EDGetTokenT<reco::VertexCompositeCandidateCollection> vccToken_;
};

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "CommonTools/UtilAlgos/interface/ObjectSelector.h"

//the selectores used to select the tracks
#include "Alignment/CommonAlignmentProducer/interface/AlignmentTracksFromVertexCompositeCandidateSelector.h"

// the following include is necessary to clone all track branches
// including recoTrackExtras and TrackingRecHitsOwned.
// if you remove it the code will compile, but the cloned
// tracks have only the recoTracks branch!
#include "CommonTools/RecoAlgos/interface/TrackSelector.h"

struct TrackFromVertexCompositeCandidateConfigSelector {
typedef std::vector<const reco::Track *> container;
typedef container::const_iterator const_iterator;
typedef reco::TrackCollection collection;

TrackFromVertexCompositeCandidateConfigSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
: theBaseSelector(cfg, iC) {}

const_iterator begin() const { return theSelectedTracks.begin(); }
const_iterator end() const { return theSelectedTracks.end(); }
size_t size() const { return theSelectedTracks.size(); }

void select(const edm::Handle<reco::TrackCollection> &c, const edm::Event &evt, const edm::EventSetup &setup) {
theSelectedTracks = theBaseSelector.select(c, evt, setup);
}

private:
container theSelectedTracks;

AlignmentTrackFromVertexCompositeCandidateSelector theBaseSelector;
};

class AlignmentTrackFromVertexCompositeCandidateSelectorModule
: public ObjectSelector<TrackFromVertexCompositeCandidateConfigSelector> {
public:
AlignmentTrackFromVertexCompositeCandidateSelectorModule(const edm::ParameterSet &ps)
: ObjectSelector<TrackFromVertexCompositeCandidateConfigSelector>(ps) {}
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions) {
edm::ParameterSetDescription desc;
desc.setComment("Alignment Tracks Selector from VertexCompositeCandidates");
desc.add<edm::InputTag>("src", edm::InputTag("generalTracks"));
desc.add<bool>("filter", false);
desc.add<edm::InputTag>("vertexCompositeCandidates", edm::InputTag("generalV0Candidates:Kshort"));
descriptions.addWithDefaultLabel(desc);
}
};

DEFINE_FWK_MODULE(AlignmentTrackFromVertexCompositeCandidateSelectorModule);
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import FWCore.ParameterSet.Config as cms

OutALCARECOPromptCalibProdSiPixelAliHGComb_noDrop = cms.PSet(
SelectEvents = cms.untracked.PSet(
SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiPixelAliHGMinBias','pathALCARECOPromptCalibProdSiPixelAliHGDiMu')
),
outputCommands = cms.untracked.vstring('keep *_SiPixelAliMillePedeFileConverterHGDimuon_*_*',
'keep *_SiPixelAliMillePedeFileConverterHG_*_*')
)

OutALCARECOPromptCalibProdSiPixelAliHGComb=OutALCARECOPromptCalibProdSiPixelAliHGComb_noDrop.clone()
OutALCARECOPromptCalibProdSiPixelAliHGComb.outputCommands.insert(0, "drop *")
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
import FWCore.ParameterSet.Config as cms

# ------------------------------------------------------------------------------
# configure a filter to run only on the events selected by TkAlZMuMu AlcaReco
from HLTrigger.HLTfilters.hltHighLevel_cfi import *
ALCARECOTkAlZMuMuFilterForSiPixelAli = hltHighLevel.clone(
HLTPaths = ['pathALCARECOTkAlZMuMu'],
throw = True, ## dont throw on unknown path names,
TriggerResultsTag = "TriggerResults::RECO"
)

from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAli_cff import *
from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import *

# Ingredient: offlineBeamSpot
from RecoVertex.BeamSpotProducer.BeamSpot_cfi import offlineBeamSpot

# Ingredient: AlignmentTrackSelector
# track selector for HighPurity tracks
#-- AlignmentTrackSelector
SiPixelAliHighPuritySelectorHGDimuon = SiPixelAliHighPuritySelector.clone(
src = 'ALCARECOTkAlZMuMu',
etaMax = 3.0,
etaMin = -3.0,
filter = True,
pMin = 8.0,
)

# track selection for alignment
SiPixelAliTrackSelectorHGDimuon = SiPixelAliTrackSelector.clone(
src = 'SiPixelAliTrackFitterHGDimuon',
applyMultiplicityFilter = True,
d0Max = 50.0,
d0Min = -50.0,
etaMax = 3.0,
etaMin = -3.0,
filter = True,
maxMultiplicity = 2,
minHitChargeStrip = 20.0,
minHitIsolation = 0.01,
minMultiplicity = 2,
nHighestPt = 2,
nHitMin = 10,
pMin = 3.0,
ptMin = 15.0,
TwoBodyDecaySelector = dict(applyChargeFilter = True,
applyMassrangeFilter = True,
maxXMass = 95.8,
minXMass = 85.8),
minHitsPerSubDet = dict(inPIXEL = 1)
)

# Ingredient: SiPixelAliTrackRefitter0
# refitting
SiPixelAliTrackRefitterHGDimuon0 = SiPixelAliTrackRefitter0.clone(
src = 'SiPixelAliHighPuritySelectorHGDimuon'
)
SiPixelAliTrackRefitterHGDimuon1 = SiPixelAliTrackRefitterHGDimuon0.clone(
src = 'SiPixelAliTrackSelectorHGDimuon'
)

#-- Alignment producer
SiPixelAliMilleAlignmentProducerHGDimuon = SiPixelAliMilleAlignmentProducer.clone(
ParameterBuilder = dict(
Selector = cms.PSet(
alignParams = cms.vstring(
"TrackerP1PXBLadder,111111",
"TrackerP1PXECPanel,111111",
)
)
),
tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHGDimuon1',
algoConfig = MillePedeAlignmentAlgorithm.clone(
binaryFile = 'milleBinaryHGDimuon_0.dat',
treeFile = 'treeFileHGDimuon.root',
monitorFile = 'millePedeMonitorHGDimuon.root',
minNumHits = 8,
skipGlobalPositionRcdCheck = True,
TrajectoryFactory = cms.PSet(
AllowZeroMaterial = cms.bool(False),
Chi2Cut = cms.double(10000.0),
ConstructTsosWithErrors = cms.bool(False),
EstimatorParameters = cms.PSet(
MaxIterationDifference = cms.untracked.double(0.01),
MaxIterations = cms.untracked.int32(100),
RobustificationConstant = cms.untracked.double(1.0),
UseInvariantMass = cms.untracked.bool(True)
),
IncludeAPEs = cms.bool(False),
MaterialEffects = cms.string('LocalGBL'),
NSigmaCut = cms.double(100.0),
ParticleProperties = cms.PSet(
PrimaryMass = cms.double(91.1061),
PrimaryWidth = cms.double(1.7678),
SecondaryMass = cms.double(0.105658)
),
PropagationDirection = cms.string('alongMomentum'),
TrajectoryFactoryName = cms.string('TwoBodyDecayTrajectoryFactory'),
UseBeamSpot = cms.bool(False),
UseHitWithoutDet = cms.bool(True),
UseInvalidHits = cms.bool(True),
UseProjectedHits = cms.bool(True),
UseRefittedState = cms.bool(True)
)
)
)

# Ingredient: SiPixelAliTrackerTrackHitFilter
SiPixelAliTrackerTrackHitFilterHGDimuon = SiPixelAliTrackerTrackHitFilter.clone(
src = 'SiPixelAliTrackRefitterHGDimuon0',
TrackAngleCut = 0.087,
minimumHits = 10
)

# Ingredient: SiPixelAliSiPixelAliTrackFitter
SiPixelAliTrackFitterHGDimuon = SiPixelAliTrackFitter.clone(
src = 'SiPixelAliTrackerTrackHitFilterHGDimuon'
)

SiPixelAliMillePedeFileConverterHGDimuon = cms.EDProducer("MillePedeFileConverter",
fileDir = cms.string(SiPixelAliMilleAlignmentProducerHGDimuon.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHGDimuon.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string(''))

seqALCARECOPromptCalibProdSiPixelAliHGDiMu = cms.Sequence(ALCARECOTkAlZMuMuFilterForSiPixelAli*
lsNumberFilter*
offlineBeamSpot*
SiPixelAliHighPuritySelectorHGDimuon*
SiPixelAliTrackRefitterHGDimuon0*
SiPixelAliTrackerTrackHitFilterHGDimuon*
SiPixelAliTrackFitterHGDimuon*
SiPixelAliTrackSelectorHGDimuon*
SiPixelAliTrackRefitterHGDimuon1*
SiPixelAliMilleAlignmentProducerHGDimuon*
SiPixelAliMillePedeFileConverterHGDimuon)
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,18 @@
)

SiPixelAliMillePedeFileConverterHG = cms.EDProducer("MillePedeFileConverter",
fileDir = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string(''),
)


fileDir = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.fileDir.value()),
inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.binaryFile.value()),
fileBlobLabel = cms.string(''))

seqALCARECOPromptCalibProdSiPixelAliHG = cms.Sequence(ALCARECOTkAlMinBiasFilterForSiPixelAliHG*
lsNumberFilter*
offlineBeamSpot*
SiPixelAliHighPuritySelectorHG*
SiPixelAliTrackRefitterHG0*
SiPixelAliTrackerTrackHitFilterHG*
SiPixelAliTrackFitterHG*
SiPixelAliTrackSelectorHG*
SiPixelAliTrackRefitterHG1*
SiPixelAliMilleAlignmentProducerHG*
SiPixelAliMillePedeFileConverterHG)
lsNumberFilter*
offlineBeamSpot*
SiPixelAliHighPuritySelectorHG*
SiPixelAliTrackRefitterHG0*
SiPixelAliTrackerTrackHitFilterHG*
SiPixelAliTrackFitterHG*
SiPixelAliTrackSelectorHG*
SiPixelAliTrackRefitterHG1*
SiPixelAliMilleAlignmentProducerHG*
SiPixelAliMillePedeFileConverterHG)
Loading

0 comments on commit b3af544

Please sign in to comment.