|
|
Go to the documentation of this file.
204 tree_ =
fs_->
make<TTree>(
"MuonRecoTree",
"MuonRecoTree");
205 tree_->Branch(
"Muon",
"L1Analysis::L1AnalysisRecoMuonDataFormat", &
muonData, 32000, 3);
206 tree_->Branch(
"RpcHit",
"L1Analysis::L1AnalysisRecoRpcHitDataFormat", &
rpcHitData, 32000, 3);
230 double matchDeltaR = 9999;
232 for (
size_t iTrigIndex = 0; iTrigIndex < trigIndices.size(); ++iTrigIndex) {
233 int triggerIndex = trigIndices[iTrigIndex];
238 const unsigned hltFilterIndex =
241 if (hltFilterIndex < triggerEvent->sizeFilters()) {
245 const unsigned nTriggers = triggerVids.size();
246 for (
size_t iTrig = 0; iTrig < nTriggers; ++iTrig) {
250 double dRtmp =
deltaR(
mu, trigObject);
252 if (dRtmp < matchDeltaR) {
432 for (; recHitIt != recHitEnd; ++recHitIt) {
433 if ((
unsigned int)iRpcRecHits >
maxRpcHit_ - 1)
436 int cls = recHitIt->clusterSize();
437 int firststrip = recHitIt->firstClusterStrip();
438 int bx = recHitIt->BunchX();
443 int sect = rpcId.
sector();
446 int roll = rpcId.
roll();
449 LocalPoint recHitPosLoc = recHitIt->localPosition();
451 GlobalPoint recHitPosGlob = RPCSurface.toGlobal(recHitPosLoc);
453 float xLoc = recHitPosLoc.
x();
454 float phiGlob = recHitPosGlob.
phi();
496 for (reco::MuonCollection::const_iterator imu = mucand->begin();
501 if (imu->isGlobalMuon())
503 if (imu->isStandAloneMuon())
505 if (imu->isTrackerMuon())
507 if (imu->isCaloMuon())
511 (!
vertex->empty() && imu->isGlobalMuon() && imu->globalTrack()->normalizedChi2() < 10. &&
512 imu->globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && imu->numberOfMatchedStations() > 1 &&
513 fabs(imu->innerTrack()->dxy(
vertex->at(0).position())) < 0.2 &&
514 fabs(imu->innerTrack()->dz(
vertex->at(0).position())) < 0.5 &&
515 imu->innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
516 imu->innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5);
526 bool isSA = (!imu->isGlobalMuon() && imu->isStandAloneMuon() && !imu->isTrackerMuon());
527 bool isTR = (!imu->isGlobalMuon() && imu->isTrackerMuon() && !imu->isStandAloneMuon());
528 bool isGL = (imu->isGlobalMuon());
529 bool isTRSA = (!imu->isGlobalMuon() && imu->isStandAloneMuon() && imu->isTrackerMuon());
547 double isoMatchDeltaR = 9999.;
548 double matchDeltaR = 9999.;
549 int hasIsoTriggered = 0;
550 int hasTriggered = 0;
582 if (isGL || isTR || isSA || isTRSA) {
594 if (!isTR && !isGL && !isTRSA)
596 if (!isSA && !isGL && !isTRSA)
606 const int lutCSC[4][6] = {
607 {26, 24, 22, 21, 23, 25}, {6, 4, 2, 1, 3, 5}, {16, 14, 12, 11, 13, 15}, {36, 34, 32, 31, 33, 35}};
609 int globalTypeRCH = -999999;
612 float globalEtaRCH = -999999;
613 float globalPhiRCH = -999999;
619 for (;
hit != hitEnd; ++
hit) {
620 if (!((*hit)->isValid()))
624 DetId detid = (*hit)->geographicalId();
689 if (lutCSC[
id.
station() - 1][3 - 1] < globalTypeRCH || globalTypeRCH < 0) {
691 globalTypeRCH = lutCSC[
id.station() - 1][3 - 1];
694 globalEtaRCH =
gp.eta();
695 globalPhiRCH =
gp.phi();
698 if (globalPhiRCH < 0)
699 globalPhiRCH = globalPhiRCH + 2 * pig;
704 hit = imu->outerTrack()->recHitsBegin();
706 for (;
hit != hitEnd;
hit++) {
707 if (!((*hit)->isValid()))
710 DetId detId = (*hit)->geographicalId();
721 int sect = rpcId.
sector();
724 int roll = rpcId.
roll();
727 float xLoc = (*hit)->localPosition().x();
750 if (imu->isEnergyValid()) {
752 muon_energy = imu->calEnergy();
769 if (imu->isTimeValid()) {
771 muon_time = imu->time();
825 double cosphi =
xx /
rr;
842 double cosphi =
xx /
rr;
859 double cosphi =
xx /
rr;
879 if (isTR || isGL || isTRSA) {
922 double cosphi =
xx /
rr;
939 double cosphi =
xx /
rr;
955 double cosphi =
xx /
rr;
971 double cosphi =
xx /
rr;
987 double cosphi =
xx /
rr;
1003 double cosphi =
xx /
rr;
1030 if (isGL || isSA || isTRSA) {
1063 double cosphi =
xx /
rr;
1080 double cosphi =
xx /
rr;
1085 double abspseta = -
log(
tan(atan(fabs(
rr /
zz)) / 2.0));
1102 double cosphi =
xx /
rr;
1119 double cosphi =
xx /
rr;
1135 double cosphi =
xx /
rr;
1152 double cosphi =
xx /
rr;
1170 double cosphi =
xx /
rr;
1187 double cosphi =
xx /
rr;
1204 double cosphi =
xx /
rr;
1286 bool changed =
true;
1293 bool enableWildcard =
true;
1294 for (
size_t iTrig = 0; iTrig <
triggerNames_.size(); ++iTrig) {
1297 TRegexp tNamePattern = TRegexp(tNameTmp, enableWildcard);
1303 if (tmpName.Contains(tNamePattern)) {
1304 tIndex =
int(ipath);
1316 TRegexp tNamePattern = TRegexp(tNameTmp, enableWildcard);
1322 if (tmpName.Contains(tNamePattern)) {
1323 tIndex =
int(ipath);
~L1MuonRecoTreeProducer() override
float ecal_time
Calorimeter timing.
std::vector< std::string > isoTriggerNames_
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
edm::ESHandle< Propagator > propagatorAlong
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel,...
std::vector< int > isoTriggerIndices_
L1MuonRecoTreeProducer(const edm::ParameterSet &)
double match_trigger(std::vector< int > &trigIndices, const trigger::TriggerObjectCollection &trigObjs, edm::Handle< trigger::TriggerEvent > &triggerEvent, const reco::Muon &mu)
constexpr Detector det() const
get the detector field from this detid
GlobalPoint globalPosition() const
static const std::string triggerResults
const RPCRoll * roll(RPCDetId id) const
Return a roll given its id.
L1Analysis::L1AnalysisRecoMuonDataFormat * muonData
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
edm::Service< TFileService > fs_
L1Analysis::L1AnalysisRecoRpcHitDataFormat * rpcHitData
edm::ESHandle< DTGeometry > dtGeom
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
const Plane & surface() const
The nominal surface of the GeomDet.
void beginRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESHandle< CSCGeometry > cscGeom
GlobalPoint position() const
std::vector< int > triggerIndices_
L1AnalysisRecoRpcHitDataFormat * getData()
Global3DPoint GlobalPoint
Single trigger physics object (e.g., an isolated muon)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
constexpr std::array< uint8_t, layerIndexSize > layer
unsigned int size() const
number of trigger paths in trigger table
TrajectoryStateClosestToPoint impactPointTSCP() const
edm::InputTag triggerSummaryLabel_
static PlanePointer build(Args &&... args)
HLTConfigProvider hltConfig_
L1Analysis::L1AnalysisRecoRpcHit * rpcHit
TrajectoryStateOnSurface surfExtrapTrkSam(reco::TrackRef track, double z)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef track)
float timeAtIpOutIn
b) particle is moving from outside in
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
C::const_iterator const_iterator
constant access iterator type
TrajectoryStateOnSurface cylExtrapTrkSam(reco::TrackRef track, double rho)
Tan< T >::type tan(const T &t)
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
float towerS9
total energy in 3x3 tower shape
std::vector< size_type > Keys
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry
L1Analysis::L1AnalysisRecoMuon * muon
void endRun(const edm::Run &, const edm::EventSetup &) override
constexpr uint32_t rawId() const
get the raw id
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
edm::ESHandle< RPCGeometry > rpcGeom
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
T getParameter(std::string const &) const
const std::string & triggerName(unsigned int triggerIndex) const
Direction direction() const
direction estimation based on time dispersion
edm::ESHandle< MagneticField > theBField
std::string triggerProcessLabel_
void beginJob(void) override
std::vector< std::string > triggerNames_
edm::ESHandle< Propagator > propagatorOpposite
Geom::Phi< T > phi() const
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
T * make(const Args &... args) const
make new ROOT object