CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Static Private Attributes
ResidualRefitting Class Reference

#include <ResidualRefitting.h>

Inheritance diagram for ResidualRefitting:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  storage_event
 
struct  StorageHit
 
struct  StorageMuon
 
struct  StorageTrackExtrap
 
struct  StorageTrackHit
 

Public Types

typedef struct ResidualRefitting::StorageHit storage_hit
 
typedef struct ResidualRefitting::StorageMuon storage_muon
 
typedef struct ResidualRefitting::StorageTrackExtrap storage_trackExtrap
 
typedef struct ResidualRefitting::StorageTrackHit storage_trackHit
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void branchMuon (ResidualRefitting::storage_muon &storageTmp, std::string branchName)
 
void branchTrackExtrap (ResidualRefitting::storage_trackExtrap &storageTmp, std::string branchName)
 
void CollectTrackHits (edm::Handle< reco::TrackCollection > trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap, const edm::EventSetup &eventSetup)
 
void cylExtrapTrkSam (int recNum, reco::TrackRef track, ResidualRefitting::storage_trackExtrap &storage, double rho)
 
void dumpMuonRecHits (const ResidualRefitting::storage_hit &hit)
 
void dumpTrackExtrap (const ResidualRefitting::storage_trackExtrap &track)
 
void dumpTrackHits (const ResidualRefitting::storage_trackHit &hit)
 
void dumpTrackRef (reco::TrackRef muon, std::string str)
 
void endJob () override
 
FreeTrajectoryState freeTrajStateMuon (reco::TrackRef muon)
 
bool IsSameHit (TrackingRecHit const &hit1, TrackingRecHit const &hit2)
 
int MatchTrackWithRecHits (reco::TrackCollection::const_iterator trackIt, edm::Handle< reco::TrackCollection > ref)
 
void muonInfo (ResidualRefitting::storage_muon &storeMuon, reco::TrackRef muon, int val)
 
void NewTrackMeasurements (edm::Handle< reco::TrackCollection > trackCollOrig, edm::Handle< reco::TrackCollection > trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap)
 
void omitStation (edm::Handle< reco::MuonCollection > funcMuons, edm::Handle< reco::TrackCollection >, ResidualRefitting::storage_muon &storeGmr, ResidualRefitting::storage_muon &storeSam, ResidualRefitting::storage_trackExtrap &storeExtrap, int omitStation)
 
void omitTrackerSystem (edm::Handle< reco::MuonCollection > trkMuons, ResidualRefitting::storage_muon &storeGmr, ResidualRefitting::storage_muon &storeTrk, ResidualRefitting::storage_trackExtrap &storeExtrap, int omitSystem)
 
 ResidualRefitting (const edm::ParameterSet &)
 
int ReturnSector (DetId detid)
 
int ReturnStation (DetId detid)
 
void StoreTrackerRecHits (DetId detid, const TrackerTopology *tTopo, int iTrack, int iRec)
 
void trkExtrap (const DetId &detid, int iTrkLink, int iTrk, int iRec, const FreeTrajectoryState &freeTrajState, const LocalPoint &recPoint, storage_trackExtrap &storeTemp)
 
void zero_muon (ResidualRefitting::storage_muon *str)
 
void zero_storage ()
 
void zero_trackExtrap (ResidualRefitting::storage_trackExtrap *str)
 
 ~ResidualRefitting () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

bool debug_
 
ResidualRefitting::storage_event eventInfo_
 
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecordmagFieldToken_
 
edm::InputTag muons_
 
edm::InputTag muonsNoPXBLayer1_
 
edm::InputTag muonsNoPXBLayer2_
 
edm::InputTag muonsNoPXBLayer3_
 
edm::InputTag muonsNoPXF_
 
edm::InputTag muonsNoStation1_
 
edm::InputTag muonsNoStation2_
 
edm::InputTag muonsNoStation3_
 
edm::InputTag muonsNoStation4_
 
edm::InputTag muonsNoTEC_
 
edm::InputTag muonsNoTIBLayer1_
 
edm::InputTag muonsNoTIBLayer2_
 
edm::InputTag muonsNoTIBLayer3_
 
edm::InputTag muonsNoTIBLayer4_
 
edm::InputTag muonsNoTID_
 
edm::InputTag muonsNoTOBLayer1_
 
edm::InputTag muonsNoTOBLayer2_
 
edm::InputTag muonsNoTOBLayer3_
 
edm::InputTag muonsNoTOBLayer4_
 
edm::InputTag muonsNoTOBLayer5_
 
edm::InputTag muonsNoTOBLayer6_
 
edm::InputTag muonsRemake_
 
TBranch * outputBranch_
 
TFile * outputFile_
 
std::string outputFileName_
 
TTree * outputTree_
 
std::string PropagatorSource_
 
const edm::ESGetToken< Propagator, TrackingComponentsRecordpropagatorToken_
 
ResidualRefitting::storage_trackExtrap samExtrap120_
 
ResidualRefitting::storage_muon storageGmrNew_
 
ResidualRefitting::storage_muon storageGmrNoPXBLayer1
 
ResidualRefitting::storage_muon storageGmrNoPXBLayer2
 
ResidualRefitting::storage_muon storageGmrNoPXBLayer3
 
ResidualRefitting::storage_muon storageGmrNoPXF
 
ResidualRefitting::storage_muon storageGmrNoSt1_
 
ResidualRefitting::storage_muon storageGmrNoSt2_
 
ResidualRefitting::storage_muon storageGmrNoSt3_
 
ResidualRefitting::storage_muon storageGmrNoSt4_
 
ResidualRefitting::storage_muon storageGmrNoTEC
 
ResidualRefitting::storage_muon storageGmrNoTIBLayer1
 
ResidualRefitting::storage_muon storageGmrNoTIBLayer2
 
ResidualRefitting::storage_muon storageGmrNoTIBLayer3
 
ResidualRefitting::storage_muon storageGmrNoTIBLayer4
 
ResidualRefitting::storage_muon storageGmrNoTID
 
ResidualRefitting::storage_muon storageGmrNoTOBLayer1
 
ResidualRefitting::storage_muon storageGmrNoTOBLayer2
 
ResidualRefitting::storage_muon storageGmrNoTOBLayer3
 
ResidualRefitting::storage_muon storageGmrNoTOBLayer4
 
ResidualRefitting::storage_muon storageGmrNoTOBLayer5
 
ResidualRefitting::storage_muon storageGmrNoTOBLayer6
 
ResidualRefitting::storage_muon storageGmrOld_
 
ResidualRefitting::storage_hit storageRecMuon_
 
ResidualRefitting::storage_muon storageSamNew_
 
ResidualRefitting::storage_muon storageSamNoSt1_
 
ResidualRefitting::storage_muon storageSamNoSt2_
 
ResidualRefitting::storage_muon storageSamNoSt3_
 
ResidualRefitting::storage_muon storageSamNoSt4_
 
ResidualRefitting::storage_trackExtrap storageTrackExtrapRec_
 
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt1_
 
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt2_
 
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt3_
 
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt4_
 
ResidualRefitting::storage_trackExtrap storageTrackExtrapTracker_
 
ResidualRefitting::storage_trackHit storageTrackHit_
 
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer1
 
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer2
 
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer3
 
ResidualRefitting::storage_trackExtrap storageTrackNoPXF
 
ResidualRefitting::storage_trackExtrap storageTrackNoTEC
 
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer1
 
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer2
 
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer3
 
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer4
 
ResidualRefitting::storage_trackExtrap storageTrackNoTID
 
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer1
 
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer2
 
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer3
 
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer4
 
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer5
 
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer6
 
ResidualRefitting::storage_muon storageTrkNew_
 
ResidualRefitting::storage_muon storageTrkNoPXBLayer1
 
ResidualRefitting::storage_muon storageTrkNoPXBLayer2
 
ResidualRefitting::storage_muon storageTrkNoPXBLayer3
 
ResidualRefitting::storage_muon storageTrkNoPXF
 
ResidualRefitting::storage_muon storageTrkNoTEC
 
ResidualRefitting::storage_muon storageTrkNoTIBLayer1
 
ResidualRefitting::storage_muon storageTrkNoTIBLayer2
 
ResidualRefitting::storage_muon storageTrkNoTIBLayer3
 
ResidualRefitting::storage_muon storageTrkNoTIBLayer4
 
ResidualRefitting::storage_muon storageTrkNoTID
 
ResidualRefitting::storage_muon storageTrkNoTOBLayer1
 
ResidualRefitting::storage_muon storageTrkNoTOBLayer2
 
ResidualRefitting::storage_muon storageTrkNoTOBLayer3
 
ResidualRefitting::storage_muon storageTrkNoTOBLayer4
 
ResidualRefitting::storage_muon storageTrkNoTOBLayer5
 
ResidualRefitting::storage_muon storageTrkNoTOBLayer6
 
const MagneticFieldtheField
 
edm::ESHandle< PropagatorthePropagator
 
MuonServiceProxytheService
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 
ResidualRefitting::storage_trackExtrap trackExtrap120_
 
const edm::ESHandle< GlobalTrackingGeometrytrackingGeometry
 
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecordtrackingGeometryToken_
 
edm::InputTag tracks_
 

Static Private Attributes

static const int N_MAX_STORED = 10
 
static const int N_MAX_STORED_HIT = 1000
 
static const int PXB = 1
 
static const int PXF = 2
 
static const int TEC = 6
 
static const int TIB = 3
 
static const int TID = 4
 
static const int TOB = 5
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 39 of file ResidualRefitting.h.

Member Typedef Documentation

◆ storage_hit

◆ storage_muon

◆ storage_trackExtrap

◆ storage_trackHit

Constructor & Destructor Documentation

◆ ResidualRefitting()

ResidualRefitting::ResidualRefitting ( const edm::ParameterSet cfg)
explicit

Definition at line 36 of file ResidualRefitting.cc.

References looper::cfg, edm::EDConsumerBase::consumesCollector(), eventInfo_, ResidualRefitting::storage_event::evtNum_, MuonServiceProxy_cff::MuonServiceProxy, and theService.

40  propagatorToken_(esConsumes(edm::ESInputTag("", cfg.getParameter<std::string>("propagator")))),
41  outputFileName_(cfg.getUntrackedParameter<std::string>("histoutputFile")),
42  muons_(cfg.getParameter<edm::InputTag>("muons")),
43  muonsRemake_(cfg.getParameter<edm::InputTag>("muonsRemake")), //This Feels Misalignment
44  muonsNoStation1_(cfg.getParameter<edm::InputTag>("muonsNoStation1")),
45  muonsNoStation2_(cfg.getParameter<edm::InputTag>("muonsNoStation2")),
46  muonsNoStation3_(cfg.getParameter<edm::InputTag>("muonsNoStation3")),
47  muonsNoStation4_(cfg.getParameter<edm::InputTag>("muonsNoStation4")),
48 
49  /*
50  muonsNoPXBLayer1_ ( cfg.getParameter<edm::InputTag>("muonsNoPXBLayer1" ) ),
51  muonsNoPXBLayer2_ ( cfg.getParameter<edm::InputTag>("muonsNoPXBLayer1" ) ),
52  muonsNoPXBLayer3_ ( cfg.getParameter<edm::InputTag>("muonsNoPXBLayer1" ) ),
53 
54  muonsNoTIBLayer1_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer1" ) ),
55  muonsNoTIBLayer2_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer2" ) ),
56  muonsNoTIBLayer3_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer3" ) ),
57  muonsNoTIBLayer4_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer4" ) ),
58 
59  muonsNoTOBLayer1_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer1" ) ),
60  muonsNoTOBLayer2_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer2" ) ),
61  muonsNoTOBLayer3_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer3" ) ),
62  muonsNoTOBLayer4_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer4" ) ),
63  muonsNoTOBLayer5_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer5" ) ),
64  muonsNoTOBLayer6_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer6" ) ),*/
65  debug_(cfg.getUntrackedParameter<bool>("doDebug")),
66  outputFile_(nullptr),
67  outputTree_(nullptr),
68  outputBranch_(nullptr),
69  theField(nullptr) {
70  eventInfo_.evtNum_ = 0;
71  eventInfo_.evtNum_ = 0;
72 
73  // service parameters
74  edm::ParameterSet serviceParameters = cfg.getParameter<edm::ParameterSet>("ServiceParameters");
75 
76  // the services
77  theService = new MuonServiceProxy(serviceParameters, consumesCollector());
78 
79 } //The constructor
const MagneticField * theField
edm::InputTag muonsNoStation2_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::InputTag muonsNoStation1_
MuonServiceProxy * theService
edm::InputTag muonsNoStation3_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
std::string outputFileName_
edm::InputTag muonsRemake_
edm::InputTag muons_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeometryToken_
ResidualRefitting::storage_event eventInfo_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
edm::InputTag muonsNoStation4_

◆ ~ResidualRefitting()

ResidualRefitting::~ResidualRefitting ( )
override

Definition at line 259 of file ResidualRefitting.cc.

References outputFile_, and theService.

259  {
260  delete outputFile_;
261  delete theService;
262 }
MuonServiceProxy * theService

Member Function Documentation

◆ analyze()

void ResidualRefitting::analyze ( const edm::Event event,
const edm::EventSetup eventSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 81 of file ResidualRefitting.cc.

References CollectTrackHits(), gather_cfg::cout, cylExtrapTrkSam(), debug_, dumpTrackRef(), eventInfo_, options_cfi::eventSetup, ResidualRefitting::storage_event::evtNum_, createfilelist::int, magFieldToken_, muonInfo(), PDWG_BPHSkim_cff::muons, muons_, muonsNoStation1_, muonsNoStation2_, muonsNoStation3_, muonsNoStation4_, muonsRemake_, ResidualRefitting::StorageMuon::n_, ResidualRefitting::StorageTrackExtrap::n_, N_MAX_STORED, NewTrackMeasurements(), outputBranch_, outputTree_, propagatorToken_, ResidualRefitting::storage_event::runNum_, samExtrap120_, storageGmrNew_, storageTrackExtrapRec_, storageTrackExtrapRecNoSt1_, storageTrackExtrapRecNoSt2_, storageTrackExtrapRecNoSt3_, storageTrackExtrapRecNoSt4_, theField, thePropagator, theService, trackExtrap120_, trackingGeometryToken_, MuonServiceProxy::update(), and zero_storage().

81  {
82  if (debug_)
83  printf("STARTING EVENT\n");
84 
85  eventInfo_.evtNum_ = (int)event.id().run();
86  eventInfo_.runNum_ = (int)event.id().event();
87 
88  // Generator Collection
89 
90  // The original muon collection that is sitting in memory
92 
98 
99  event.getByLabel(muons_, muons); //set label to muons
100  event.getByLabel(muonsRemake_, muonTracks);
101  event.getByLabel(muonsNoStation1_, muonsNoSt1);
102  event.getByLabel(muonsNoStation2_, muonsNoSt2);
103  event.getByLabel(muonsNoStation3_, muonsNoSt3);
104  event.getByLabel(muonsNoStation4_, muonsNoSt4);
105 
106  /*
107 // std::cout<<"Muon Collection No PXB "<<std::endl;
108 //Tracker Barrel Pixel Refits
109  edm::Handle<MuonCollection> muonsNoPXBLayer1Coll;
110  event.getByLabel(muonsNoPXBLayer1_, muonsNoPXBLayer1Coll);
111  edm::Handle<MuonCollection> muonsNoPXBLayer2Coll;
112  event.getByLabel(muonsNoPXBLayer2_, muonsNoPXBLayer2Coll);
113  edm::Handle<MuonCollection> muonsNoPXBLayer3Coll;
114  event.getByLabel(muonsNoPXBLayer3_, muonsNoPXBLayer3Coll);
115 // std::cout<<"Muon Collection No TIB "<<std::endl;
116 // Tracker Inner Barrel Refits
117  edm::Handle<MuonCollection> muonsNoTIBLayer1Coll;
118  event.getByLabel(muonsNoTIBLayer1_, muonsNoTIBLayer1Coll);
119  edm::Handle<MuonCollection> muonsNoTIBLayer2Coll;
120  event.getByLabel(muonsNoTIBLayer2_, muonsNoTIBLayer2Coll);
121  edm::Handle<MuonCollection> muonsNoTIBLayer3Coll;
122  event.getByLabel(muonsNoTIBLayer3_, muonsNoTIBLayer3Coll);
123  edm::Handle<MuonCollection> muonsNoTIBLayer4Coll;
124  event.getByLabel(muonsNoTIBLayer4_, muonsNoTIBLayer4Coll);
125 
126 // std::cout<<"Muon Collection No TOB "<<std::endl;
127 
128 //Tracker outer barrel refits
129  edm::Handle<MuonCollection> muonsNoTOBLayer1Coll;
130  event.getByLabel(muonsNoTOBLayer1_, muonsNoTOBLayer1Coll);
131  edm::Handle<MuonCollection> muonsNoTOBLayer2Coll;
132  event.getByLabel(muonsNoTOBLayer2_, muonsNoTOBLayer2Coll);
133  edm::Handle<MuonCollection> muonsNoTOBLayer3Coll;
134  event.getByLabel(muonsNoTOBLayer3_, muonsNoTOBLayer3Coll);
135  edm::Handle<MuonCollection> muonsNoTOBLayer4Coll;
136  event.getByLabel(muonsNoTOBLayer4_, muonsNoTOBLayer4Coll);
137  edm::Handle<MuonCollection> muonsNoTOBLayer5Coll;
138  event.getByLabel(muonsNoTOBLayer5_, muonsNoTOBLayer5Coll);
139  edm::Handle<MuonCollection> muonsNoTOBLayer6Coll;
140  event.getByLabel(muonsNoTOBLayer6_, muonsNoTOBLayer6Coll);
141 */
142  //magnetic field information
143  theField = &eventSetup.getData(magFieldToken_);
144  edm::ESHandle<GlobalTrackingGeometry> globalTrackingGeometry = eventSetup.getHandle(trackingGeometryToken_);
147 
148  //Zero storage
149  zero_storage();
150 
151  //Do the Gmr Muons from the unModified Collection
152 
153  /*
154  int iGmr = 0;
155  if ( (muons->end() - muons->begin()) > 0) printf("Data Dump:: Original GMR Muons\n");
156  for ( MuonCollection::const_iterator muon = muons->begin(); muon!=muons->end(); muon++, iGmr++) {
157  if ( iGmr >= ResidualRefitting::N_MAX_STORED) break; // error checking
158  if (!debug
159 
160  dumpTrackRef(muon->combinedMuon(), "cmb");
161  dumpTrackRef(muon->standAloneMuon(), "sam");
162  dumpTrackRef(muon->track(), "trk");
163 
164 
165  }
166  storageGmrOld_.n_ = iGmr;
167  storageSamNew_.n_ = iGmr;
168 */
169 
170  //Refitted muons
171  if (debug_)
172  printf("Data Dump:: Rebuilt GMR Muon Track With TeV refitter default\n");
173  int iGmrRemake = 0;
174  for (reco::TrackCollection::const_iterator muon = muonTracks->begin(); muon != muonTracks->end();
175  muon++, iGmrRemake++) {
176  if (iGmrRemake >= ResidualRefitting::N_MAX_STORED)
177  break; // error checking
178  // from TrackInfoProducer/test/TrackInfoAnalyzerExample.cc
179  reco::TrackRef trackref = reco::TrackRef(muonTracks, iGmrRemake);
180 
181  if (debug_)
182  dumpTrackRef(trackref, "gmr");
183  muonInfo(storageGmrNew_, trackref, iGmrRemake);
184  }
185  storageGmrNew_.n_ = iGmrRemake;
186 
187  if (debug_)
188  printf("muons Remake");
189  if (debug_)
190  printf("-----------------------------------------\n");
192 
193  if (true) {
194  printf("muons No Station 1");
195  printf("-----------------------------------------\n");
196  }
197  NewTrackMeasurements(muonTracks, muonsNoSt1, storageTrackExtrapRecNoSt1_);
198 
199  if (true) {
200  printf("muons No Station 2");
201  printf("-----------------------------------------\n");
202  }
203  NewTrackMeasurements(muonTracks, muonsNoSt2, storageTrackExtrapRecNoSt2_);
204 
205  if (true) {
206  printf("muons No Station 3");
207  printf("-----------------------------------------\n");
208  }
209  NewTrackMeasurements(muonTracks, muonsNoSt3, storageTrackExtrapRecNoSt3_);
210 
211  if (true) {
212  printf("muons No Station 4");
213  printf("-----------------------------------------\n");
214  }
215  NewTrackMeasurements(muonTracks, muonsNoSt4, storageTrackExtrapRecNoSt4_);
216 
217  // dumpMuonRecHits(storageRecMuon_);
218 
219  /****************************************************************************************************************************************/
220 
221  /*
222  * extrapolates track to a cylinder.
223  * commented for cosmic runs with no tracker in reco muons!!
224  *
225 */
226 
227  int iGmrCyl = 0;
228  for (reco::MuonCollection::const_iterator muon = muons->begin(); muon != muons->end(); muon++, iGmrCyl++) {
229  dumpTrackRef(muon->combinedMuon(), "cmb");
230  dumpTrackRef(muon->standAloneMuon(), "sam");
231  dumpTrackRef(muon->track(), "trk");
232 
233  cylExtrapTrkSam(iGmrCyl, muon->standAloneMuon(), samExtrap120_, 120.);
234  cylExtrapTrkSam(iGmrCyl, muon->track(), trackExtrap120_, 120.);
235  }
236  samExtrap120_.n_ = iGmrCyl;
237  trackExtrap120_.n_ = iGmrCyl;
238 
239  if (iGmrRemake > 0 || iGmrCyl > 0) {
240  outputTree_->Fill();
241  std::cout << "FILLING NTUPLE!" << std::endl;
242  std::cout << "Entries Recorded: " << outputTree_->GetEntries() << " Branch :: " << outputBranch_->GetEntries()
243  << std::endl
244  << std::endl;
245  } else
246  std::cout << "no tracks -- no fill!\n" << std::endl << std::endl;
247 
248  // /*************************************************************************************************************/
249  // //END OF ntuple dumper
250  // //END OF ntuple dumper
251  // /***********************************************************************************************************/
252 }
void CollectTrackHits(edm::Handle< reco::TrackCollection > trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap, const edm::EventSetup &eventSetup)
static const int N_MAX_STORED
void dumpTrackRef(reco::TrackRef muon, std::string str)
const MagneticField * theField
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt3_
void NewTrackMeasurements(edm::Handle< reco::TrackCollection > trackCollOrig, edm::Handle< reco::TrackCollection > trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap)
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt1_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRec_
edm::InputTag muonsNoStation2_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt4_
const edm::ESGetToken< Propagator, TrackingComponentsRecord > propagatorToken_
void muonInfo(ResidualRefitting::storage_muon &storeMuon, reco::TrackRef muon, int val)
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt2_
edm::InputTag muonsNoStation1_
MuonServiceProxy * theService
ResidualRefitting::storage_trackExtrap trackExtrap120_
edm::InputTag muonsNoStation3_
ResidualRefitting::storage_muon storageGmrNew_
edm::InputTag muonsRemake_
void cylExtrapTrkSam(int recNum, reco::TrackRef track, ResidualRefitting::storage_trackExtrap &storage, double rho)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
edm::InputTag muons_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeometryToken_
ResidualRefitting::storage_event eventInfo_
void update(const edm::EventSetup &setup, bool duringEvent=true)
update the services each event
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
edm::ESHandle< Propagator > thePropagator
edm::InputTag muonsNoStation4_
Definition: event.py:1
ResidualRefitting::storage_trackExtrap samExtrap120_

◆ beginJob()

void ResidualRefitting::beginJob ( )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 962 of file ResidualRefitting.cc.

References branchMuon(), branchTrackExtrap(), gather_cfg::cout, eventInfo_, outputBranch_, outputFile_, outputFileName_, outputTree_, samExtrap120_, storageGmrNew_, storageGmrNoPXBLayer1, storageGmrNoPXBLayer2, storageGmrNoPXBLayer3, storageGmrNoPXF, storageGmrNoSt1_, storageGmrNoSt2_, storageGmrNoSt3_, storageGmrNoSt4_, storageGmrNoTEC, storageGmrNoTIBLayer1, storageGmrNoTIBLayer2, storageGmrNoTIBLayer3, storageGmrNoTIBLayer4, storageGmrNoTID, storageGmrNoTOBLayer1, storageGmrNoTOBLayer2, storageGmrNoTOBLayer3, storageGmrNoTOBLayer4, storageGmrNoTOBLayer5, storageGmrNoTOBLayer6, storageGmrOld_, storageRecMuon_, storageSamNew_, storageSamNoSt1_, storageSamNoSt2_, storageSamNoSt3_, storageSamNoSt4_, storageTrackExtrapRec_, storageTrackExtrapRecNoSt1_, storageTrackExtrapRecNoSt2_, storageTrackExtrapRecNoSt3_, storageTrackExtrapRecNoSt4_, storageTrackExtrapTracker_, storageTrackHit_, storageTrackNoPXBLayer1, storageTrackNoPXBLayer2, storageTrackNoPXBLayer3, storageTrackNoPXF, storageTrackNoTEC, storageTrackNoTIBLayer1, storageTrackNoTIBLayer2, storageTrackNoTIBLayer3, storageTrackNoTIBLayer4, storageTrackNoTID, storageTrackNoTOBLayer1, storageTrackNoTOBLayer2, storageTrackNoTOBLayer3, storageTrackNoTOBLayer4, storageTrackNoTOBLayer5, storageTrackNoTOBLayer6, storageTrkNew_, storageTrkNoPXBLayer1, storageTrkNoPXBLayer2, storageTrkNoPXBLayer3, storageTrkNoPXF, storageTrkNoTEC, storageTrkNoTIBLayer1, storageTrkNoTIBLayer2, storageTrkNoTIBLayer3, storageTrkNoTIBLayer4, storageTrkNoTID, storageTrkNoTOBLayer1, storageTrkNoTOBLayer2, storageTrkNoTOBLayer3, storageTrkNoTOBLayer4, storageTrkNoTOBLayer5, storageTrkNoTOBLayer6, and trackExtrap120_.

962  {
963  std::cout << "Creating file " << outputFileName_.c_str() << std::endl;
964 
965  outputFile_ = new TFile(outputFileName_.c_str(), "RECREATE");
966 
967  outputTree_ = new TTree("outputTree", "outputTree");
968 
969  outputTree_->Branch("eventInfo",
970  &eventInfo_,
971  "evtNum_/I:"
972  "runNum_/I");
973 
980 
986 
1004 
1021 
1022  outputBranch_ = outputTree_->Branch("recHitsNew",
1023  &storageRecMuon_,
1024 
1025  "n_/I:"
1026  "muonLink_[1000]/I:"
1027 
1028  "system_[1000]/I:"
1029  "endcap_[1000]/I:"
1030  "station_[1000]/I:"
1031  "ring_[1000]/I:"
1032  "chamber_[1000]/I:"
1033  "layer_[1000]/I:"
1034  "superLayer_[1000]/I:"
1035  "wheel_[1000]/I:"
1036  "sector_[1000]/I:"
1037 
1038  "gpX_[1000]/F:"
1039  "gpY_[1000]/F:"
1040  "gpZ_[1000]/F:"
1041  "gpEta_[1000]/F:"
1042  "gpPhi_[1000]/F:"
1043  "lpX_[1000]/F:"
1044  "lpY_[1000]/F:"
1045  "lpZ_[1000]/F");
1046 
1047  outputBranch_ = outputTree_->Branch("recHitsTracker",
1049 
1050  "n_/I:"
1051 
1052  "muonLink_[1000]/I:"
1053  "detector_[1000]/I:"
1054  "subdetector_[1000]/I:"
1055  "blade_[1000]/I:"
1056  "disk_[1000]/I:"
1057  "ladder_[1000]/I:"
1058  "layer_[1000]/I:"
1059  "module_[1000]/I:"
1060  "panel_[1000]/I:"
1061  "ring_[1000]/I:"
1062  "side_[1000]/I:"
1063  "wheel_[1000]/I:"
1064 
1065  "gpX_[1000]/F:"
1066  "gpY_[1000]/F:"
1067  "gpZ_[1000]/F:"
1068  "gpEta_[1000]/F:"
1069  "gpPhi_[1000]/F:"
1070  "lpX_[1000]/F:"
1071  "lpY_[1000]/F:"
1072  "lpZ_[1000]/F");
1073 
1079 
1097 
1100 }
ResidualRefitting::storage_muon storageGmrNoTIBLayer4
ResidualRefitting::storage_muon storageTrkNoTOBLayer4
ResidualRefitting::storage_muon storageGmrNoTOBLayer1
ResidualRefitting::storage_trackExtrap storageTrackNoTEC
ResidualRefitting::storage_muon storageGmrNoPXBLayer1
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer1
ResidualRefitting::storage_muon storageGmrNoTID
ResidualRefitting::storage_muon storageTrkNoTOBLayer6
ResidualRefitting::storage_muon storageGmrNoTIBLayer1
ResidualRefitting::storage_trackHit storageTrackHit_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt3_
ResidualRefitting::storage_muon storageTrkNoTOBLayer5
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer2
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer4
ResidualRefitting::storage_muon storageTrkNoTIBLayer2
ResidualRefitting::storage_muon storageGmrNoTOBLayer2
ResidualRefitting::storage_muon storageGmrNoSt1_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer6
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt1_
ResidualRefitting::storage_muon storageGmrNoTOBLayer6
ResidualRefitting::storage_muon storageSamNew_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer4
ResidualRefitting::storage_muon storageTrkNoTID
ResidualRefitting::storage_trackExtrap storageTrackExtrapTracker_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRec_
ResidualRefitting::storage_muon storageGmrNoTOBLayer4
ResidualRefitting::storage_muon storageGmrNoSt4_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt4_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer2
void branchMuon(ResidualRefitting::storage_muon &storageTmp, std::string branchName)
ResidualRefitting::storage_muon storageSamNoSt4_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt2_
ResidualRefitting::storage_muon storageTrkNoPXBLayer2
ResidualRefitting::storage_muon storageGmrNoSt2_
ResidualRefitting::storage_muon storageGmrNoSt3_
ResidualRefitting::storage_muon storageGmrNoPXBLayer2
ResidualRefitting::storage_muon storageGmrOld_
ResidualRefitting::storage_muon storageTrkNoPXF
ResidualRefitting::storage_muon storageGmrNoTEC
ResidualRefitting::storage_trackExtrap trackExtrap120_
ResidualRefitting::storage_muon storageGmrNoTIBLayer3
ResidualRefitting::storage_muon storageGmrNew_
std::string outputFileName_
ResidualRefitting::storage_muon storageGmrNoTIBLayer2
ResidualRefitting::storage_muon storageTrkNoTIBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTID
ResidualRefitting::storage_muon storageTrkNoTOBLayer2
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer5
ResidualRefitting::storage_muon storageSamNoSt2_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer3
ResidualRefitting::storage_muon storageTrkNoTOBLayer1
ResidualRefitting::storage_muon storageGmrNoPXBLayer3
ResidualRefitting::storage_muon storageTrkNoTEC
ResidualRefitting::storage_muon storageSamNoSt3_
ResidualRefitting::storage_muon storageTrkNoPXBLayer1
ResidualRefitting::storage_muon storageTrkNoTIBLayer1
ResidualRefitting::storage_muon storageGmrNoTOBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer1
ResidualRefitting::storage_event eventInfo_
ResidualRefitting::storage_hit storageRecMuon_
ResidualRefitting::storage_muon storageTrkNoTOBLayer3
ResidualRefitting::storage_muon storageTrkNew_
ResidualRefitting::storage_trackExtrap storageTrackNoPXF
ResidualRefitting::storage_muon storageSamNoSt1_
ResidualRefitting::storage_muon storageGmrNoTOBLayer5
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer1
void branchTrackExtrap(ResidualRefitting::storage_trackExtrap &storageTmp, std::string branchName)
ResidualRefitting::storage_muon storageGmrNoPXF
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer2
ResidualRefitting::storage_muon storageTrkNoPXBLayer3
ResidualRefitting::storage_muon storageTrkNoTIBLayer4
ResidualRefitting::storage_trackExtrap samExtrap120_

◆ branchMuon()

void ResidualRefitting::branchMuon ( ResidualRefitting::storage_muon storageTmp,
std::string  branchName 
)

Definition at line 1104 of file ResidualRefitting.cc.

References electrons_cff::branchName, outputBranch_, and outputTree_.

Referenced by beginJob().

1104  {
1105  outputBranch_ = outputTree_->Branch(branchName.c_str(),
1106  &storageTmp,
1107  "n_/I:"
1108  "charge_[10]/I:"
1109  "pt_[10]/F:"
1110  "eta_[10]/F:"
1111  "p_[10]/F:"
1112  "phi_[10]/F:"
1113  "numRecHits_[10]/I:"
1114  "chiSq_[10]/F:"
1115  "ndf_[10]/F:"
1116  "chiSqOvrNdf_[10]/F"
1117 
1118  );
1119 }

◆ branchTrackExtrap()

void ResidualRefitting::branchTrackExtrap ( ResidualRefitting::storage_trackExtrap storageTmp,
std::string  branchName 
)

Definition at line 1123 of file ResidualRefitting.cc.

References electrons_cff::branchName, outputBranch_, and outputTree_.

Referenced by beginJob().

1123  {
1124  outputBranch_ = outputTree_->Branch(branchName.c_str(),
1125  &storageTmp,
1126  "n_/I:"
1127  "muonLink_[1000]/I:"
1128  "recLink_[1000]/I:"
1129  "gpX_[1000]/F:"
1130  "gpY_[1000]/F:"
1131  "gpZ_[1000]/F:"
1132  "gpEta_[1000]/F:"
1133  "gpPhi_[1000]/F:"
1134  "lpX_[1000]/F:"
1135  "lpY_[1000]/F:"
1136  "lpZ_[1000]/F:"
1137  "resX_[1000]/F:"
1138  "resY_[1000]/F:"
1139  "resZ_[1000]/F"
1140 
1141  );
1142 }

◆ CollectTrackHits()

void ResidualRefitting::CollectTrackHits ( edm::Handle< reco::TrackCollection trackColl,
ResidualRefitting::storage_trackExtrap trackExtrap,
const edm::EventSetup eventSetup 
)

Definition at line 266 of file ResidualRefitting.cc.

References relativeConstraints::chamber, ResidualRefitting::StorageHit::chamber_, MuonSubdetId::CSC, debug_, DetId::det(), MuonSubdetId::DT, dumpTrackRef(), makeMuonMisalignmentScenario::endcap, ResidualRefitting::StorageHit::endcap_, options_cfi::eventSetup, freeTrajStateMuon(), runTauDisplay::gp, ResidualRefitting::StorageHit::gpEta_, ResidualRefitting::StorageTrackHit::gpEta_, ResidualRefitting::StorageHit::gpPhi_, ResidualRefitting::StorageTrackHit::gpPhi_, ResidualRefitting::StorageHit::gpX_, ResidualRefitting::StorageTrackHit::gpX_, ResidualRefitting::StorageHit::gpY_, ResidualRefitting::StorageTrackHit::gpY_, ResidualRefitting::StorageHit::gpZ_, ResidualRefitting::StorageTrackHit::gpZ_, triggerObjects_cff::id, GlobalTrackingGeometry::idToDet(), phase1PixelTopology::layer, ResidualRefitting::StorageHit::layer_, ResidualRefitting::StorageHit::lpX_, ResidualRefitting::StorageTrackHit::lpX_, ResidualRefitting::StorageHit::lpY_, ResidualRefitting::StorageTrackHit::lpY_, ResidualRefitting::StorageHit::lpZ_, ResidualRefitting::StorageTrackHit::lpZ_, DetId::Muon, ResidualRefitting::StorageHit::muonLink_, ResidualRefitting::StorageHit::n_, ResidualRefitting::StorageTrackExtrap::n_, ResidualRefitting::StorageTrackHit::n_, DetId::rawId(), relativeConstraints::ring, ResidualRefitting::StorageHit::ring_, MuonSubdetId::RPC, ResidualRefitting::StorageHit::sector_, MuonTransientTrackingRecHit::specificBuild(), relativeConstraints::station, ResidualRefitting::StorageHit::station_, storageRecMuon_, storageTrackHit_, StoreTrackerRecHits(), DetId::subdetId(), ResidualRefitting::StorageHit::superLayer_, ResidualRefitting::StorageHit::system_, theService, topoToken_, pfDisplacedTrackerVertex_cfi::trackColl, DetId::Tracker, MuonServiceProxy::trackingGeometry(), trkExtrap(), makeMuonMisalignmentScenario::wheel, ResidualRefitting::StorageHit::wheel_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

268  {
269  //Retrieve tracker topology from geometry
270  const TrackerTopology* const tTopo = &eventSetup.getData(topoToken_);
271 
272  int iMuonHit = 0;
273  int iTrackHit = 0;
274  int numTracks = 0;
275 
276  for (reco::TrackCollection::const_iterator muon = trackColl->begin(); muon != trackColl->end(); muon++) {
277  int iTrack = muon - trackColl->begin();
278  reco::TrackRef trackref = reco::TrackRef(trackColl, iTrack);
280 
281  if (debug_)
282  dumpTrackRef(trackref, "CollectTrackHits Track");
283 
284  int iRec = 0;
285  for (auto const& rec : muon->recHits()) {
286  DetId detid = rec->geographicalId();
287 
288  if (detid.det() != DetId::Muon && detid.det() != DetId::Tracker) {
289  if (debug_)
290  printf("Rec Hit not from muon system or tracker... continuing...\n");
291  continue;
292  }
293  // numTracks++;
294  // Get Local and Global Position of Hits
295 
296  LocalPoint lp = rec->localPosition();
297  float lpX = lp.x();
298  float lpY = lp.y();
299  float lpZ = lp.z();
300 
302  theService->trackingGeometry()->idToDet(rec->geographicalId()), rec);
303 
304  GlobalPoint gp = mrhp->globalPosition();
305  float gpRecX = gp.x();
306  float gpRecY = gp.y();
307  float gpRecZ = gp.z();
308  float gpRecEta = gp.eta();
309  float gpRecPhi = gp.phi();
310 
311  if (detid.det() == DetId::Muon) {
312  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
313  int endcap = -999;
314  int station = -999;
315  int ring = -999;
316  int chamber = -999;
317  int layer = -999;
318  int superLayer = -999;
319  int wheel = -999;
320  int sector = -999;
321  if (systemMuon == MuonSubdetId::CSC) {
322  CSCDetId id(detid.rawId());
323  endcap = id.endcap();
324  station = id.station();
325  ring = id.ring();
326  chamber = id.chamber();
327  layer = id.layer();
328  if (debug_)
329  printf("CSC\t[endcap][station][ringN][chamber][layer]:[%d][%d][%d][%d][%d]\t",
330  endcap,
331  station,
332  ring,
333  chamber,
334  layer);
335 
336  } else if (systemMuon == MuonSubdetId::DT) {
337  DTWireId id(detid.rawId());
338  station = id.station();
339  layer = id.layer();
340  superLayer = id.superLayer();
341  wheel = id.wheel();
342  sector = id.sector();
343  if (debug_)
344  printf("DT \t[station][layer][superlayer]:[%d][%d][%d]\n", station, layer, superLayer);
345 
346  } else if (systemMuon == MuonSubdetId::RPC) {
347  RPCDetId id(detid.rawId());
348  station = id.station();
349  if (debug_)
350  printf("RPC\t[station]:[%d]\n", station);
351  }
352 
353  storageRecMuon_.muonLink_[iMuonHit] = iTrack;
354  storageRecMuon_.system_[iMuonHit] = systemMuon;
355  storageRecMuon_.endcap_[iMuonHit] = endcap;
356  storageRecMuon_.station_[iMuonHit] = station;
357  storageRecMuon_.ring_[iMuonHit] = ring;
358  storageRecMuon_.chamber_[iMuonHit] = chamber;
359  storageRecMuon_.layer_[iMuonHit] = layer;
360  storageRecMuon_.superLayer_[iMuonHit] = superLayer;
361  storageRecMuon_.wheel_[iMuonHit] = wheel;
362  storageRecMuon_.sector_[iMuonHit] = sector;
363 
364  storageRecMuon_.gpX_[iMuonHit] = gpRecX;
365  storageRecMuon_.gpY_[iMuonHit] = gpRecY;
366  storageRecMuon_.gpZ_[iMuonHit] = gpRecZ;
367  storageRecMuon_.gpEta_[iMuonHit] = gpRecEta;
368  storageRecMuon_.gpPhi_[iMuonHit] = gpRecPhi;
369  storageRecMuon_.lpX_[iMuonHit] = lpX;
370  storageRecMuon_.lpY_[iMuonHit] = lpY;
371  storageRecMuon_.lpZ_[iMuonHit] = lpZ;
372  iMuonHit++;
373 
374  } else if (detid.det() == DetId::Tracker) {
375  if (debug_)
376  printf("Tracker\n");
377 
378  StoreTrackerRecHits(detid, tTopo, iTrack, iTrackHit);
379 
380  storageTrackHit_.gpX_[iTrackHit] = gpRecX;
381  storageTrackHit_.gpY_[iTrackHit] = gpRecY;
382  storageTrackHit_.gpZ_[iTrackHit] = gpRecZ;
383  storageTrackHit_.gpEta_[iTrackHit] = gpRecEta;
384  storageTrackHit_.gpPhi_[iTrackHit] = gpRecPhi;
385  storageTrackHit_.lpX_[iTrackHit] = lpX;
386  storageTrackHit_.lpY_[iTrackHit] = lpY;
387  storageTrackHit_.lpZ_[iTrackHit] = lpZ;
388  iTrackHit++;
389  } else
390  printf("THIS CAN NOT HAPPEN\n");
391 
392  trkExtrap(detid, numTracks, iTrack, iRec, recoStart, lp, trackExtrap);
393  numTracks++;
394 
395  if (debug_)
396  printf("\tLocal Positon: \tx = %2.2f\ty = %2.2f\tz = %2.2f\n", lpX, lpY, lpZ);
397  if (debug_)
398  printf("\tGlobal Position: \tx = %6.2f\ty = %6.2f\tz = %6.2f\teta = %4.2f\tphi = %3.2f\n",
399  gpRecX,
400  gpRecY,
401  gpRecZ,
402  gpRecEta,
403  gpRecPhi);
404 
405  ++iRec;
406  }
407  }
408 
409  storageRecMuon_.n_ = iMuonHit;
410  storageTrackHit_.n_ = iTrackHit;
411  trackExtrap.n_ = numTracks;
412 }
int endcap_[N_MAX_STORED_HIT]
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
void dumpTrackRef(reco::TrackRef muon, std::string str)
float lpZ_[N_MAX_STORED_HIT]
T z() const
Definition: PV3DBase.h:61
ResidualRefitting::storage_trackHit storageTrackHit_
int sector_[N_MAX_STORED_HIT]
int layer_[N_MAX_STORED_HIT]
int chamber_[N_MAX_STORED_HIT]
float lpY_[N_MAX_STORED_HIT]
const GeomDet * idToDet(DetId) const override
void trkExtrap(const DetId &detid, int iTrkLink, int iTrk, int iRec, const FreeTrajectoryState &freeTrajState, const LocalPoint &recPoint, storage_trackExtrap &storeTemp)
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
int muonLink_[N_MAX_STORED_HIT]
float gpEta_[N_MAX_STORED_HIT]
constexpr std::array< uint8_t, layerIndexSize > layer
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
float lpX_[N_MAX_STORED_HIT]
int wheel_[N_MAX_STORED_HIT]
float gpY_[N_MAX_STORED_HIT]
MuonServiceProxy * theService
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: DetId.h:17
float gpX_[N_MAX_STORED_HIT]
int station_[N_MAX_STORED_HIT]
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
float gpPhi_[N_MAX_STORED_HIT]
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
static constexpr int RPC
Definition: MuonSubdetId.h:13
int ring_[N_MAX_STORED_HIT]
float gpZ_[N_MAX_STORED_HIT]
int superLayer_[N_MAX_STORED_HIT]
ResidualRefitting::storage_hit storageRecMuon_
void StoreTrackerRecHits(DetId detid, const TrackerTopology *tTopo, int iTrack, int iRec)
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
int system_[N_MAX_STORED_HIT]

◆ cylExtrapTrkSam()

void ResidualRefitting::cylExtrapTrkSam ( int  recNum,
reco::TrackRef  track,
ResidualRefitting::storage_trackExtrap storage,
double  rho 
)

Definition at line 776 of file ResidualRefitting.cc.

References Cylinder::build(), debug_, PV3DBase< T, PVType, FrameType >::eta(), freeTrajStateMuon(), TrajectoryStateOnSurface::globalPosition(), ResidualRefitting::StorageTrackExtrap::gpEta_, ResidualRefitting::StorageTrackExtrap::gpPhi_, ResidualRefitting::StorageTrackExtrap::gpX_, ResidualRefitting::StorageTrackExtrap::gpY_, ResidualRefitting::StorageTrackExtrap::gpZ_, TrajectoryStateOnSurface::isValid(), ResidualRefitting::StorageTrackExtrap::muonLink_, PV3DBase< T, PVType, FrameType >::phi(), Propagator::propagate(), rho, makeMuonMisalignmentScenario::rot, mathSSE::sqrt(), thePropagator, HLT_2022v11_cff::track, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

779  {
780  Cylinder::PositionType pos(0, 0, 0);
782 
784  // SteppingHelixPropagator inwardProp ( theField, oppositeToMomentum );
785  // SteppingHelixPropagator outwardProp ( theField, alongMomentum );
787  // TrajectoryStateOnSurface recoProp = outwardProp.propagate(recoStart, *myCylinder);
788  TrajectoryStateOnSurface recoProp = thePropagator->propagate(recoStart, *myCylinder);
789 
790  double xVal = -9999;
791  double yVal = -9999;
792  double zVal = -9999;
793  double phiVal = -9999;
794  double etaVal = -9999;
795 
796  if (recoProp.isValid()) {
797  GlobalPoint recoPoint = recoProp.globalPosition();
798  xVal = recoPoint.x();
799  yVal = recoPoint.y();
800  zVal = recoPoint.z();
801  phiVal = recoPoint.phi();
802  etaVal = recoPoint.eta();
803  }
804  storage.muonLink_[recNum] = recNum;
805  storage.gpX_[recNum] = xVal;
806  storage.gpY_[recNum] = yVal;
807  storage.gpZ_[recNum] = zVal;
808  storage.gpEta_[recNum] = etaVal;
809  storage.gpPhi_[recNum] = phiVal;
810 
811  float rhoVal = sqrt(xVal * xVal + yVal * yVal);
812 
813  printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
814  if (debug_)
815  printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
816 }
T z() const
Definition: PV3DBase.h:61
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:19
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=nullptr)
Definition: Cylinder.h:45
edm::ESHandle< Propagator > thePropagator

◆ dumpMuonRecHits()

void ResidualRefitting::dumpMuonRecHits ( const ResidualRefitting::storage_hit hit)

Definition at line 1196 of file ResidualRefitting.cc.

References gather_cfg::cout, mps_fire::i, and createfilelist::int.

1196  {
1197  std::cout << "Muon Rec Hits Dump:\n";
1198  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1199  // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1200 
1201  printf("%d\tsubdetector = %d\t superLayer =%d", i, (int)hit.system_[i], (int)hit.superLayer_[i]);
1202  // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1203  // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1204  // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1205  // printf ("\trho =%0.3f" , rho );
1206  // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1207  // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1208  printf("\t\tLocal\tx = %0.3f", (float)hit.lpX_[i]);
1209  printf("\ty = %0.3f", (float)hit.lpY_[i]);
1210  printf("\tz = %0.3f\n", (float)hit.lpZ_[i]);
1211  }
1212 }

◆ dumpTrackExtrap()

void ResidualRefitting::dumpTrackExtrap ( const ResidualRefitting::storage_trackExtrap track)

Definition at line 1175 of file ResidualRefitting.cc.

References gather_cfg::cout, mps_fire::i, createfilelist::int, and HLT_2022v11_cff::track.

1175  {
1176  std::cout << "\n\nExtrapolation Dump:\n";
1177  for (unsigned int i = 0; i < (unsigned int)track.n_; i++) {
1178  // double rho = sqrt( (float)track.gpX_[i] * (float)track.gpX_[i] + (float)track.gpY_[i] * (float)track.gpY_[i] );
1179 
1180  printf("%d\tmuonLink= %d", i, (int)track.muonLink_[i]);
1181  printf("\trecLink = %d", (int)track.recLink_[i]);
1182  // printf ("\tGlobal\tx = %0.3f" , (float)track.gpX_[i] );
1183  // printf ("\ty = %0.3f" , (float)track.gpY_[i] );
1184  // printf ("\tz = %0.3f" , (float)track.gpZ_[i] );
1185  // printf ("\trho =%0.3f" , rho );
1186  // printf ("\teta = %0.3f" , (float)track.gpEta_[i] );
1187  // printf ("\tphi = %0.3f" , (float)track.gpPhi_[i] );
1188  printf("\t\tLocal\tx = %0.3f", (float)track.lpX_[i]);
1189  printf("\ty = %0.3f", (float)track.lpY_[i]);
1190  printf("\tz = %0.3f\n", (float)track.lpZ_[i]);
1191  }
1192 }

◆ dumpTrackHits()

void ResidualRefitting::dumpTrackHits ( const ResidualRefitting::storage_trackHit hit)

Definition at line 1216 of file ResidualRefitting.cc.

References gather_cfg::cout, mps_fire::i, and createfilelist::int.

1216  {
1217  std::cout << "Tracker Rec Hits Dump:\n";
1218  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1219  // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1220 
1221  printf("%d\tsubdetector = %d", i, (int)hit.subdetector_[i]);
1222  printf("\tlayer = %d", (int)hit.layer_[i]);
1223  // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1224  // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1225  // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1226  // printf ("\trho =%0.3f" , rho );
1227  // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1228  // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1229  printf("\t\tLocal\tx = %0.3f", (float)hit.lpX_[i]);
1230  printf("\ty = %0.3f", (float)hit.lpY_[i]);
1231  printf("\tz = %0.3f\n", (float)hit.lpZ_[i]);
1232  }
1233 }

◆ dumpTrackRef()

void ResidualRefitting::dumpTrackRef ( reco::TrackRef  muon,
std::string  str 
)

Definition at line 1237 of file ResidualRefitting.cc.

References PVValHelper::eta, AlCaHLTBitMon_ParallelJobs::p, phi, DiDispStaMuonMonitor_cfi::pt, and str.

Referenced by analyze(), and CollectTrackHits().

1237  {
1238  float pt = muon->pt();
1239  float p = muon->p();
1240  float eta = muon->eta();
1241  float phi = muon->phi();
1242  printf("\t%s: \tp = %4.2f \t pt = %4.2f \t eta = %4.2f \t phi = %4.2f\n", str.c_str(), p, pt, eta, phi);
1243 }
#define str(s)

◆ endJob()

void ResidualRefitting::endJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 1146 of file ResidualRefitting.cc.

References outputFile_.

Referenced by o2olib.O2ORunMgr::executeJob().

1146  {
1147  outputFile_->Write();
1148 
1149  outputFile_->Close();
1150 }

◆ freeTrajStateMuon()

FreeTrajectoryState ResidualRefitting::freeTrajStateMuon ( reco::TrackRef  muon)

Definition at line 1154 of file ResidualRefitting.cc.

References gather_cfg::cout, debug_, and theField.

Referenced by CollectTrackHits(), cylExtrapTrkSam(), and NewTrackMeasurements().

1154  {
1155  math::XYZPoint innerPos = muon->referencePoint();
1156  math::XYZVector innerMom = muon->momentum();
1157  if (debug_)
1158  std::cout << "Inner Pos: "
1159  << "\tx = " << innerPos.X() << "\ty = " << innerPos.Y() << "\tz = " << innerPos.Z() << std::endl;
1160 
1161  GlobalPoint innerPoint(innerPos.X(), innerPos.Y(), innerPos.Z());
1162  GlobalVector innerVec(innerMom.X(), innerMom.Y(), innerMom.Z());
1163 
1164  FreeTrajectoryState recoStart(innerPoint, innerVec, muon->charge(), theField);
1165  return recoStart;
1166 }
const MagneticField * theField
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12

◆ IsSameHit()

bool ResidualRefitting::IsSameHit ( TrackingRecHit const &  hit1,
TrackingRecHit const &  hit2 
)

Definition at line 529 of file ResidualRefitting.cc.

References MillePedeFileConverter_cfg::e, TrackingRecHit::localPosition(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by MatchTrackWithRecHits(), and NewTrackMeasurements().

529  {
530  double lpx1 = hit1.localPosition().x();
531  double lpy1 = hit1.localPosition().y();
532  double lpz1 = hit1.localPosition().z();
533 
534  double lpx2 = hit2.localPosition().x();
535  double lpy2 = hit2.localPosition().y();
536  double lpz2 = hit2.localPosition().z();
537  if (fabs(lpx1 - lpx2) > 1e-3)
538  return false;
539  // printf("Match lpx...\n");
540  if (fabs(lpy1 - lpy2) > 1e-3)
541  return false;
542  // printf("Match lpy...\n");
543  if (fabs(lpz1 - lpz2) > 1e-3)
544  return false;
545  // printf("Match lpz...\n");
546 
547  return true;
548 }

◆ MatchTrackWithRecHits()

int ResidualRefitting::MatchTrackWithRecHits ( reco::TrackCollection::const_iterator  trackIt,
edm::Handle< reco::TrackCollection ref 
)

Definition at line 463 of file ResidualRefitting.cc.

References debug_, beamvalidation::exit(), and IsSameHit().

Referenced by NewTrackMeasurements().

464  {
465  if (debug_)
466  printf("Matching a re-fitted track to the original track.\n");
467 
468  int TrackMatch = -1;
469 
470  for (auto const& rec : trackIt->recHits()) {
471  bool foundMatch = false;
472  for (reco::TrackCollection::const_iterator refIt = ref->begin(); refIt != ref->end(); refIt++) {
473  int iTrackMatch = refIt - ref->begin();
474  if (foundMatch && TrackMatch != iTrackMatch)
475  break;
476  for (auto const& recRef : refIt->recHits()) {
477  if (!IsSameHit(*rec, *recRef))
478  continue;
479 
480  foundMatch = true;
481  TrackMatch = iTrackMatch;
482  // printf("Rec hit match for original track %d\n", iTrackMatch);
483  }
484  }
485  if (!foundMatch) {
486  printf("SOMETHING WENT WRONG! Could not match Track with original track!");
487  exit(1);
488  }
489  }
490  if (debug_)
491  printf("Rec hit match for original track %d\n", TrackMatch);
492 
493  // reco::TrackRef trackref=reco::TrackRef(ref,TrackMatch);
494  return TrackMatch;
495 }
bool IsSameHit(TrackingRecHit const &hit1, TrackingRecHit const &hit2)
def exit(msg="")

◆ muonInfo()

void ResidualRefitting::muonInfo ( ResidualRefitting::storage_muon storeMuon,
reco::TrackRef  muon,
int  val 
)

Definition at line 645 of file ResidualRefitting.cc.

References ResidualRefitting::StorageMuon::charge_, ResidualRefitting::StorageMuon::chiSq_, ResidualRefitting::StorageMuon::chiSqOvrNdf_, ResidualRefitting::StorageMuon::eta_, ResidualRefitting::StorageMuon::ndf_, ResidualRefitting::StorageMuon::numRecHits_, ResidualRefitting::StorageMuon::p_, ResidualRefitting::StorageMuon::phi_, ResidualRefitting::StorageMuon::pt_, and heppy_batch::val.

Referenced by analyze().

645  {
646  storeMuon.pt_[val] = muon->pt();
647  storeMuon.p_[val] = muon->p();
648  storeMuon.eta_[val] = muon->eta();
649  storeMuon.phi_[val] = muon->phi();
650  storeMuon.charge_[val] = muon->charge();
651  storeMuon.numRecHits_[val] = muon->numberOfValidHits();
652  storeMuon.chiSq_[val] = muon->chi2();
653  storeMuon.ndf_[val] = muon->ndof();
654  storeMuon.chiSqOvrNdf_[val] = muon->normalizedChi2();
655 }
float chiSqOvrNdf_[N_MAX_STORED]

◆ NewTrackMeasurements()

void ResidualRefitting::NewTrackMeasurements ( edm::Handle< reco::TrackCollection trackCollOrig,
edm::Handle< reco::TrackCollection trackColl,
ResidualRefitting::storage_trackExtrap trackExtrap 
)

Definition at line 421 of file ResidualRefitting.cc.

References freeTrajStateMuon(), GlobalTrackingGeometry::idToDet(), IsSameHit(), MatchTrackWithRecHits(), ResidualRefitting::StorageTrackExtrap::n_, MuonTransientTrackingRecHit::specificBuild(), theService, pfDisplacedTrackerVertex_cfi::trackColl, MuonServiceProxy::trackingGeometry(), and trkExtrap().

Referenced by analyze().

423  {
424  int numTracks = 0;
425  int recCounter = 0;
426 
427  for (reco::TrackCollection::const_iterator muon = trackColl->begin(); muon != trackColl->end(); muon++) {
428  int iTrack = muon - trackColl->begin();
429 
430  reco::TrackRef trackref = reco::TrackRef(trackColl, iTrack);
432 
433  int iTrackLink = MatchTrackWithRecHits(muon, trackCollOrig);
434  reco::TrackRef ref = reco::TrackRef(trackCollOrig, iTrackLink);
435 
436  for (auto const& rec1 : ref->recHits()) {
437  bool unbiasedRec = true;
438 
439  for (auto const& rec2 : muon->recHits()) {
440  if (IsSameHit(*rec1, *rec2)) {
441  unbiasedRec = false;
442  break;
443  }
444  }
445  if (!unbiasedRec)
446  continue;
447 
448  DetId detid = rec1->geographicalId();
449 
451  theService->trackingGeometry()->idToDet(rec1->geographicalId()), rec1);
452 
453  trkExtrap(detid, numTracks, iTrackLink, recCounter, recoStart, rec1->localPosition(), trackExtrap);
454  numTracks++;
455  }
456  }
457 
458  trackExtrap.n_ = numTracks;
459 }
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
bool IsSameHit(TrackingRecHit const &hit1, TrackingRecHit const &hit2)
const GeomDet * idToDet(DetId) const override
void trkExtrap(const DetId &detid, int iTrkLink, int iTrk, int iRec, const FreeTrajectoryState &freeTrajState, const LocalPoint &recPoint, storage_trackExtrap &storeTemp)
int MatchTrackWithRecHits(reco::TrackCollection::const_iterator trackIt, edm::Handle< reco::TrackCollection > ref)
MuonServiceProxy * theService
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
Definition: DetId.h:17
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)

◆ omitStation()

void ResidualRefitting::omitStation ( edm::Handle< reco::MuonCollection funcMuons,
edm::Handle< reco::TrackCollection ,
ResidualRefitting::storage_muon storeGmr,
ResidualRefitting::storage_muon storeSam,
ResidualRefitting::storage_trackExtrap storeExtrap,
int  omitStation 
)

◆ omitTrackerSystem()

void ResidualRefitting::omitTrackerSystem ( edm::Handle< reco::MuonCollection trkMuons,
ResidualRefitting::storage_muon storeGmr,
ResidualRefitting::storage_muon storeTrk,
ResidualRefitting::storage_trackExtrap storeExtrap,
int  omitSystem 
)

◆ ReturnSector()

int ResidualRefitting::ReturnSector ( DetId  detid)

Definition at line 759 of file ResidualRefitting.cc.

References DetId::det(), MuonSubdetId::DT, triggerObjects_cff::id, DetId::Muon, DetId::rawId(), and DetId::subdetId().

Referenced by trkExtrap().

759  {
760  int sector = -999;
761 
762  if (detid.det() == DetId::Muon) {
763  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
764  if (systemMuon == MuonSubdetId::DT) {
765  DTWireId id(detid.rawId());
766  sector = id.sector();
767  }
768  }
769 
770  return sector;
771 }
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static constexpr int DT
Definition: MuonSubdetId.h:11

◆ ReturnStation()

int ResidualRefitting::ReturnStation ( DetId  detid)

Definition at line 735 of file ResidualRefitting.cc.

References MuonSubdetId::CSC, DetId::det(), MuonSubdetId::DT, triggerObjects_cff::id, DetId::Muon, DetId::rawId(), MuonSubdetId::RPC, relativeConstraints::station, and DetId::subdetId().

Referenced by trkExtrap().

735  {
736  int station = -999;
737 
738  if (detid.det() == DetId::Muon) {
739  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
740  if (systemMuon == MuonSubdetId::CSC) {
741  CSCDetId id(detid.rawId());
742  station = id.station();
743 
744  } else if (systemMuon == MuonSubdetId::DT) {
745  DTWireId id(detid.rawId());
746  station = id.station();
747 
748  } else if (systemMuon == MuonSubdetId::RPC) {
749  RPCDetId id(detid.rawId());
750  station = id.station();
751  }
752  }
753 
754  return station;
755 }
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static constexpr int RPC
Definition: MuonSubdetId.h:13
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ StoreTrackerRecHits()

void ResidualRefitting::StoreTrackerRecHits ( DetId  detid,
const TrackerTopology tTopo,
int  iTrack,
int  iRec 
)

Definition at line 553 of file ResidualRefitting.cc.

References ResidualRefitting::StorageTrackHit::blade_, gather_cfg::cout, debug_, DetId::det(), hgcalTestNeighbor_cfi::detector, ResidualRefitting::StorageTrackHit::detector_, ResidualRefitting::StorageTrackHit::disk_, PVValHelper::ladder, ResidualRefitting::StorageTrackHit::ladder_, phase1PixelTopology::layer, ResidualRefitting::StorageTrackHit::layer_, callgraph::module, ResidualRefitting::StorageTrackHit::module_, ResidualRefitting::StorageTrackHit::muonLink_, ResidualRefitting::StorageTrackHit::panel_, PXB, TrackerTopology::pxbLadder(), TrackerTopology::pxbLayer(), TrackerTopology::pxbModule(), PXF, TrackerTopology::pxfBlade(), TrackerTopology::pxfDisk(), TrackerTopology::pxfModule(), TrackerTopology::pxfPanel(), TrackerTopology::pxfSide(), DetId::rawId(), relativeConstraints::ring, ResidualRefitting::StorageTrackHit::ring_, ResidualRefitting::StorageTrackHit::side_, storageTrackHit_, subdetector, ResidualRefitting::StorageTrackHit::subdetector_, DetId::subdetId(), TEC, TrackerTopology::tecModule(), TrackerTopology::tecRing(), TIB, TrackerTopology::tibLayer(), TrackerTopology::tibModule(), TID, TrackerTopology::tidRing(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), TOB, TrackerTopology::tobLayer(), TrackerTopology::tobModule(), DetId::Tracker, makeMuonMisalignmentScenario::wheel, and ResidualRefitting::StorageTrackHit::wheel_.

Referenced by CollectTrackHits().

553  {
554  int detector = -1;
555  int subdetector = -1;
556  int blade = -1;
557  int disk = -1;
558  int ladder = -1;
559  int layer = -1;
560  int module = -1;
561  int panel = -1;
562  int ring = -1;
563  int side = -1;
564  int wheel = -1;
565 
566  //Detector Info
567 
568  detector = detid.det();
569  subdetector = detid.subdetId();
570 
571  if (detector != DetId::Tracker) {
572  std::cout << "OMFG NOT THE TRACKER\n" << std::endl;
573  return;
574  }
575 
576  if (debug_)
577  std::cout << "Tracker:: ";
579  layer = tTopo->pxbLayer(detid.rawId());
580  ladder = tTopo->pxbLadder(detid.rawId());
581  module = tTopo->pxbModule(detid.rawId());
582  if (debug_)
583  std::cout << "PXB"
584  << "\tlayer = " << layer << "\tladder = " << ladder << "\tmodule = " << module;
585 
586  } else if (subdetector == ResidualRefitting::PXF) {
587  side = tTopo->pxfSide(detid.rawId());
588  disk = tTopo->pxfDisk(detid.rawId());
589  blade = tTopo->pxfBlade(detid.rawId());
590  panel = tTopo->pxfPanel(detid.rawId());
591  module = tTopo->pxfModule(detid.rawId());
592  if (debug_)
593  std::cout << "PXF"
594  << "\tside = " << side << "\tdisk = " << disk << "\tblade = " << blade << "\tpanel = " << panel
595  << "\tmodule = " << module;
596 
597  } else if (subdetector == ResidualRefitting::TIB) {
598  layer = tTopo->tibLayer(detid.rawId());
599  module = tTopo->tibModule(detid.rawId());
600  if (debug_)
601  std::cout << "TIB"
602  << "\tlayer = " << layer << "\tmodule = " << module;
603  } else if (subdetector == ResidualRefitting::TID) {
604  side = tTopo->tidSide(detid.rawId());
605  wheel = tTopo->tidWheel(detid.rawId());
606  ring = tTopo->tidRing(detid.rawId());
607  if (debug_)
608  std::cout << "TID"
609  << "\tside = " << side << "\twheel = " << wheel << "\tring = " << ring;
610 
611  } else if (subdetector == ResidualRefitting::TOB) {
612  layer = tTopo->tobLayer(detid.rawId());
613  module = tTopo->tobModule(detid.rawId());
614  if (debug_)
615  std::cout << "TOB"
616  << "\tlayer = " << layer << "\tmodule = " << module;
617 
618  } else if (subdetector == ResidualRefitting::TEC) {
619  ring = tTopo->tecRing(detid.rawId());
620  module = tTopo->tecModule(detid.rawId());
621  if (debug_)
622  std::cout << "TEC"
623  << "\tring = " << ring << "\tmodule = " << module;
624  }
625 
626  //Do Storage
627 
628  storageTrackHit_.muonLink_[iRec] = iTrack;
631  storageTrackHit_.blade_[iRec] = blade;
632  storageTrackHit_.disk_[iRec] = disk;
634  storageTrackHit_.layer_[iRec] = layer;
636  storageTrackHit_.panel_[iRec] = panel;
637  storageTrackHit_.ring_[iRec] = ring;
638  storageTrackHit_.side_[iRec] = side;
639  storageTrackHit_.wheel_[iRec] = wheel;
640 }
static const int TIB
unsigned int tobLayer(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
unsigned int tibModule(const DetId &id) const
unsigned int tidSide(const DetId &id) const
TString subdetector
unsigned int pxfModule(const DetId &id) const
static const int PXB
ResidualRefitting::storage_trackHit storageTrackHit_
unsigned int tidWheel(const DetId &id) const
static const int TOB
unsigned int pxbLadder(const DetId &id) const
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
unsigned int tecRing(const DetId &id) const
ring id
static const int TEC
constexpr std::array< uint8_t, layerIndexSize > layer
static const int TID
unsigned int tecModule(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfSide(const DetId &id) const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
static const int PXF
unsigned int tidRing(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
unsigned int tobModule(const DetId &id) const
unsigned int pxbModule(const DetId &id) const

◆ trkExtrap()

void ResidualRefitting::trkExtrap ( const DetId detid,
int  iTrkLink,
int  iTrk,
int  iRec,
const FreeTrajectoryState freeTrajState,
const LocalPoint recPoint,
storage_trackExtrap storeTemp 
)

Definition at line 659 of file ResidualRefitting.cc.

References gather_cfg::cout, debug_, DetId::det(), PV3DBase< T, PVType, FrameType >::eta(), TrajectoryStateOnSurface::globalPosition(), ResidualRefitting::StorageTrackExtrap::gpEta_, ResidualRefitting::StorageTrackExtrap::gpPhi_, ResidualRefitting::StorageTrackExtrap::gpX_, ResidualRefitting::StorageTrackExtrap::gpY_, ResidualRefitting::StorageTrackExtrap::gpZ_, GlobalTrackingGeometry::idToDet(), TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localPosition(), ResidualRefitting::StorageTrackExtrap::lpX_, ResidualRefitting::StorageTrackExtrap::lpY_, ResidualRefitting::StorageTrackExtrap::lpZ_, DetId::Muon, ResidualRefitting::StorageTrackExtrap::muonLink_, PV3DBase< T, PVType, FrameType >::phi(), Propagator::propagate(), ResidualRefitting::StorageTrackExtrap::recLink_, ResidualRefitting::StorageTrackExtrap::resX_, ResidualRefitting::StorageTrackExtrap::resY_, ResidualRefitting::StorageTrackExtrap::resZ_, ReturnSector(), ReturnStation(), GeomDet::surface(), thePropagator, theService, DetId::Tracker, MuonServiceProxy::trackingGeometry(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by CollectTrackHits(), and NewTrackMeasurements().

665  {
666  bool dump_ = debug_;
667 
668  if (dump_)
669  std::cout << "In the trkExtrap function" << std::endl;
670 
671  float gpExtrapX = -99999;
672  float gpExtrapY = -99999;
673  float gpExtrapZ = -99999;
674  float gpExtrapEta = -99999;
675  float gpExtrapPhi = -99999;
676 
677  float lpX = -99999;
678  float lpY = -99999;
679  float lpZ = -99999;
680 
681  //
682  // Get the local positions for the recHits
683  //
684 
685  float recLpX = recPoint.x();
686  float recLpY = recPoint.y();
687  float recLpZ = recPoint.z();
688 
689  float resX = -9999;
690  float resY = -9999;
691  float resZ = -9999;
692 
693  const GeomDet* gdet = theService->trackingGeometry()->idToDet(detid);
694 
695  // TrajectoryStateOnSurface surfTest = prop.propagate(freeTrajState, gdet->surface());
696  TrajectoryStateOnSurface surfTest = thePropagator->propagate(freeTrajState, gdet->surface());
697 
698  if (surfTest.isValid()) {
699  GlobalPoint globTest = surfTest.globalPosition();
700  gpExtrapX = globTest.x();
701  gpExtrapY = globTest.y();
702  gpExtrapZ = globTest.z();
703  gpExtrapEta = globTest.eta();
704  gpExtrapPhi = globTest.phi();
705  LocalPoint loc = surfTest.localPosition();
706  if (detid.det() == DetId::Muon || detid.det() == DetId::Tracker) {
707  lpX = loc.x();
708  lpY = loc.y();
709  lpZ = loc.z();
710 
711  resX = lpX - recLpX;
712  resY = lpY - recLpY;
713  resZ = lpZ - recLpZ;
714  }
715  }
716  storeTemp.muonLink_[iTrk] = iTrkLink;
717  storeTemp.recLink_[iTrk] = iRec;
718  storeTemp.gpX_[iTrk] = gpExtrapX;
719  storeTemp.gpY_[iTrk] = gpExtrapY;
720  storeTemp.gpZ_[iTrk] = gpExtrapZ;
721  storeTemp.gpEta_[iTrk] = gpExtrapEta;
722  storeTemp.gpPhi_[iTrk] = gpExtrapPhi;
723  storeTemp.lpX_[iTrk] = lpX;
724  storeTemp.lpY_[iTrk] = lpY;
725  storeTemp.lpZ_[iTrk] = lpZ;
726  storeTemp.resX_[iTrk] = resX;
727  storeTemp.resY_[iTrk] = resY;
728  storeTemp.resZ_[iTrk] = resZ;
729 
730  printf("station: %d\tsector: %d\tresX storage: %4.2f\n", ReturnStation(detid), ReturnSector(detid), resX);
731 }
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
int ReturnStation(DetId detid)
T z() const
Definition: PV3DBase.h:61
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
int ReturnSector(DetId detid)
T eta() const
Definition: PV3DBase.h:73
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:50
const GeomDet * idToDet(DetId) const override
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
GlobalPoint globalPosition() const
MuonServiceProxy * theService
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
edm::ESHandle< Propagator > thePropagator

◆ zero_muon()

void ResidualRefitting::zero_muon ( ResidualRefitting::storage_muon str)

Definition at line 924 of file ResidualRefitting.cc.

References mps_fire::i, N_MAX_STORED, and str.

Referenced by zero_storage().

924  {
925  str->n_ = 0;
926 
927  for (int i = 0; i < ResidualRefitting::N_MAX_STORED; i++) {
928  str->pt_[i] = -9999;
929  str->eta_[i] = -9999;
930  str->p_[i] = -9999;
931  str->phi_[i] = -9999;
932  str->numRecHits_[i] = -9999;
933  str->chiSq_[i] = -9999;
934  str->ndf_[i] = -9999;
935  str->chiSqOvrNdf_[i] = -9999;
936  }
937 }
static const int N_MAX_STORED
#define str(s)

◆ zero_storage()

void ResidualRefitting::zero_storage ( )

Definition at line 824 of file ResidualRefitting.cc.

References debug_, ResidualRefitting::StorageHit::n_, ResidualRefitting::StorageTrackHit::n_, samExtrap120_, storageGmrNew_, storageGmrNoPXBLayer1, storageGmrNoPXBLayer2, storageGmrNoPXBLayer3, storageGmrNoPXF, storageGmrNoSt1_, storageGmrNoSt2_, storageGmrNoSt3_, storageGmrNoSt4_, storageGmrNoTEC, storageGmrNoTIBLayer1, storageGmrNoTIBLayer2, storageGmrNoTIBLayer3, storageGmrNoTIBLayer4, storageGmrNoTID, storageGmrNoTOBLayer1, storageGmrNoTOBLayer2, storageGmrNoTOBLayer3, storageGmrNoTOBLayer4, storageGmrNoTOBLayer5, storageGmrNoTOBLayer6, storageGmrOld_, storageRecMuon_, storageSamNew_, storageSamNoSt1_, storageSamNoSt2_, storageSamNoSt3_, storageSamNoSt4_, storageTrackExtrapRec_, storageTrackExtrapRecNoSt1_, storageTrackExtrapRecNoSt2_, storageTrackExtrapRecNoSt3_, storageTrackExtrapRecNoSt4_, storageTrackExtrapTracker_, storageTrackHit_, storageTrackNoPXBLayer1, storageTrackNoPXBLayer2, storageTrackNoPXBLayer3, storageTrackNoPXF, storageTrackNoTEC, storageTrackNoTIBLayer1, storageTrackNoTIBLayer2, storageTrackNoTIBLayer3, storageTrackNoTIBLayer4, storageTrackNoTID, storageTrackNoTOBLayer1, storageTrackNoTOBLayer2, storageTrackNoTOBLayer3, storageTrackNoTOBLayer4, storageTrackNoTOBLayer5, storageTrackNoTOBLayer6, storageTrkNew_, storageTrkNoPXBLayer1, storageTrkNoPXBLayer2, storageTrkNoPXBLayer3, storageTrkNoPXF, storageTrkNoTEC, storageTrkNoTIBLayer1, storageTrkNoTIBLayer2, storageTrkNoTIBLayer3, storageTrkNoTIBLayer4, storageTrkNoTID, storageTrkNoTOBLayer1, storageTrkNoTOBLayer2, storageTrkNoTOBLayer3, storageTrkNoTOBLayer4, storageTrkNoTOBLayer5, storageTrkNoTOBLayer6, trackExtrap120_, zero_muon(), and zero_trackExtrap().

Referenced by analyze().

824  {
825  if (debug_)
826  printf("zero_storage\n");
827 
840  //zero out the tracker
844 
846 
851 
853 
860 
862 
866 
868 
873 
875 
882 
884 
891 
893 
895 
899 
901 
906 
913 
915 
917 
918  storageRecMuon_.n_ = 0;
919  storageTrackHit_.n_ = 0;
920 }
ResidualRefitting::storage_muon storageGmrNoTIBLayer4
ResidualRefitting::storage_muon storageTrkNoTOBLayer4
void zero_muon(ResidualRefitting::storage_muon *str)
ResidualRefitting::storage_muon storageGmrNoTOBLayer1
ResidualRefitting::storage_trackExtrap storageTrackNoTEC
ResidualRefitting::storage_muon storageGmrNoPXBLayer1
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer1
ResidualRefitting::storage_muon storageGmrNoTID
ResidualRefitting::storage_muon storageTrkNoTOBLayer6
ResidualRefitting::storage_muon storageGmrNoTIBLayer1
ResidualRefitting::storage_trackHit storageTrackHit_
void zero_trackExtrap(ResidualRefitting::storage_trackExtrap *str)
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt3_
ResidualRefitting::storage_muon storageTrkNoTOBLayer5
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer2
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer4
ResidualRefitting::storage_muon storageTrkNoTIBLayer2
ResidualRefitting::storage_muon storageGmrNoTOBLayer2
ResidualRefitting::storage_muon storageGmrNoSt1_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer6
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt1_
ResidualRefitting::storage_muon storageGmrNoTOBLayer6
ResidualRefitting::storage_muon storageSamNew_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer4
ResidualRefitting::storage_muon storageTrkNoTID
ResidualRefitting::storage_trackExtrap storageTrackExtrapTracker_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRec_
ResidualRefitting::storage_muon storageGmrNoTOBLayer4
ResidualRefitting::storage_muon storageGmrNoSt4_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt4_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer2
ResidualRefitting::storage_muon storageSamNoSt4_
ResidualRefitting::storage_trackExtrap storageTrackExtrapRecNoSt2_
ResidualRefitting::storage_muon storageTrkNoPXBLayer2
ResidualRefitting::storage_muon storageGmrNoSt2_
ResidualRefitting::storage_muon storageGmrNoSt3_
ResidualRefitting::storage_muon storageGmrNoPXBLayer2
ResidualRefitting::storage_muon storageGmrOld_
ResidualRefitting::storage_muon storageTrkNoPXF
ResidualRefitting::storage_muon storageGmrNoTEC
ResidualRefitting::storage_trackExtrap trackExtrap120_
ResidualRefitting::storage_muon storageGmrNoTIBLayer3
ResidualRefitting::storage_muon storageGmrNew_
ResidualRefitting::storage_muon storageGmrNoTIBLayer2
ResidualRefitting::storage_muon storageTrkNoTIBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTID
ResidualRefitting::storage_muon storageTrkNoTOBLayer2
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer5
ResidualRefitting::storage_muon storageSamNoSt2_
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer3
ResidualRefitting::storage_muon storageTrkNoTOBLayer1
ResidualRefitting::storage_muon storageGmrNoPXBLayer3
ResidualRefitting::storage_muon storageTrkNoTEC
ResidualRefitting::storage_muon storageSamNoSt3_
ResidualRefitting::storage_muon storageTrkNoPXBLayer1
ResidualRefitting::storage_muon storageTrkNoTIBLayer1
ResidualRefitting::storage_muon storageGmrNoTOBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer1
ResidualRefitting::storage_hit storageRecMuon_
ResidualRefitting::storage_muon storageTrkNoTOBLayer3
ResidualRefitting::storage_muon storageTrkNew_
ResidualRefitting::storage_trackExtrap storageTrackNoPXF
ResidualRefitting::storage_muon storageSamNoSt1_
ResidualRefitting::storage_muon storageGmrNoTOBLayer5
ResidualRefitting::storage_trackExtrap storageTrackNoTIBLayer3
ResidualRefitting::storage_trackExtrap storageTrackNoTOBLayer1
ResidualRefitting::storage_muon storageGmrNoPXF
ResidualRefitting::storage_trackExtrap storageTrackNoPXBLayer2
ResidualRefitting::storage_muon storageTrkNoPXBLayer3
ResidualRefitting::storage_muon storageTrkNoTIBLayer4
ResidualRefitting::storage_trackExtrap samExtrap120_

◆ zero_trackExtrap()

void ResidualRefitting::zero_trackExtrap ( ResidualRefitting::storage_trackExtrap str)

Definition at line 941 of file ResidualRefitting.cc.

References mps_fire::i, N_MAX_STORED_HIT, and str.

Referenced by zero_storage().

941  {
942  str->n_ = 0;
943  for (int i = 0; i < ResidualRefitting::N_MAX_STORED_HIT; i++) {
944  str->muonLink_[i] = -9999;
945  str->recLink_[i] = -9999;
946  str->gpX_[i] = -9999;
947  str->gpY_[i] = -9999;
948  str->gpZ_[i] = -9999;
949  str->gpEta_[i] = -9999;
950  str->gpPhi_[i] = -9999;
951  str->lpX_[i] = -9999;
952  str->lpY_[i] = -9999;
953  str->lpZ_[i] = -9999;
954  str->resX_[i] = -9999;
955  str->resY_[i] = -9999;
956  str->resZ_[i] = -9999;
957  }
958 }
static const int N_MAX_STORED_HIT
#define str(s)

Member Data Documentation

◆ debug_

bool ResidualRefitting::debug_

◆ eventInfo_

ResidualRefitting::storage_event ResidualRefitting::eventInfo_

Definition at line 59 of file ResidualRefitting.h.

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

◆ magFieldToken_

const edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> ResidualRefitting::magFieldToken_

Definition at line 324 of file ResidualRefitting.h.

Referenced by analyze().

◆ muons_

edm::InputTag ResidualRefitting::muons_

Definition at line 335 of file ResidualRefitting.h.

Referenced by analyze().

◆ muonsNoPXBLayer1_

edm::InputTag ResidualRefitting::muonsNoPXBLayer1_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoPXBLayer2_

edm::InputTag ResidualRefitting::muonsNoPXBLayer2_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoPXBLayer3_

edm::InputTag ResidualRefitting::muonsNoPXBLayer3_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoPXF_

edm::InputTag ResidualRefitting::muonsNoPXF_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoStation1_

edm::InputTag ResidualRefitting::muonsNoStation1_

Definition at line 335 of file ResidualRefitting.h.

Referenced by analyze().

◆ muonsNoStation2_

edm::InputTag ResidualRefitting::muonsNoStation2_

Definition at line 335 of file ResidualRefitting.h.

Referenced by analyze().

◆ muonsNoStation3_

edm::InputTag ResidualRefitting::muonsNoStation3_

Definition at line 335 of file ResidualRefitting.h.

Referenced by analyze().

◆ muonsNoStation4_

edm::InputTag ResidualRefitting::muonsNoStation4_

Definition at line 335 of file ResidualRefitting.h.

Referenced by analyze().

◆ muonsNoTEC_

edm::InputTag ResidualRefitting::muonsNoTEC_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTIBLayer1_

edm::InputTag ResidualRefitting::muonsNoTIBLayer1_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTIBLayer2_

edm::InputTag ResidualRefitting::muonsNoTIBLayer2_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTIBLayer3_

edm::InputTag ResidualRefitting::muonsNoTIBLayer3_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTIBLayer4_

edm::InputTag ResidualRefitting::muonsNoTIBLayer4_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTID_

edm::InputTag ResidualRefitting::muonsNoTID_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTOBLayer1_

edm::InputTag ResidualRefitting::muonsNoTOBLayer1_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTOBLayer2_

edm::InputTag ResidualRefitting::muonsNoTOBLayer2_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTOBLayer3_

edm::InputTag ResidualRefitting::muonsNoTOBLayer3_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTOBLayer4_

edm::InputTag ResidualRefitting::muonsNoTOBLayer4_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTOBLayer5_

edm::InputTag ResidualRefitting::muonsNoTOBLayer5_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsNoTOBLayer6_

edm::InputTag ResidualRefitting::muonsNoTOBLayer6_

Definition at line 335 of file ResidualRefitting.h.

◆ muonsRemake_

edm::InputTag ResidualRefitting::muonsRemake_

Definition at line 335 of file ResidualRefitting.h.

Referenced by analyze().

◆ N_MAX_STORED

const int ResidualRefitting::N_MAX_STORED = 10
staticprivate

◆ N_MAX_STORED_HIT

const int ResidualRefitting::N_MAX_STORED_HIT = 1000
staticprivate

◆ outputBranch_

TBranch* ResidualRefitting::outputBranch_

Definition at line 348 of file ResidualRefitting.h.

Referenced by analyze(), beginJob(), branchMuon(), and branchTrackExtrap().

◆ outputFile_

TFile* ResidualRefitting::outputFile_

Definition at line 345 of file ResidualRefitting.h.

Referenced by beginJob(), endJob(), and ~ResidualRefitting().

◆ outputFileName_

std::string ResidualRefitting::outputFileName_

Definition at line 330 of file ResidualRefitting.h.

Referenced by beginJob().

◆ outputTree_

TTree* ResidualRefitting::outputTree_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze(), beginJob(), branchMuon(), and branchTrackExtrap().

◆ PropagatorSource_

std::string ResidualRefitting::PropagatorSource_

Definition at line 332 of file ResidualRefitting.h.

◆ propagatorToken_

const edm::ESGetToken<Propagator, TrackingComponentsRecord> ResidualRefitting::propagatorToken_

Definition at line 327 of file ResidualRefitting.h.

Referenced by analyze().

◆ PXB

const int ResidualRefitting::PXB = 1
staticprivate

Definition at line 43 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

◆ PXF

const int ResidualRefitting::PXF = 2
staticprivate

Definition at line 44 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

◆ samExtrap120_

ResidualRefitting::storage_trackExtrap ResidualRefitting::samExtrap120_

Definition at line 248 of file ResidualRefitting.h.

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

◆ storageGmrNew_

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNew_

Definition at line 224 of file ResidualRefitting.h.

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

◆ storageGmrNoPXBLayer1

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXBLayer1

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoPXBLayer2

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXBLayer2

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoPXBLayer3

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXBLayer3

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoPXF

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXF

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoSt1_

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt1_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoSt2_

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt2_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoSt3_

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt3_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoSt4_

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt4_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTEC

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTEC

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTIBLayer1

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer1

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTIBLayer2

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer2

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTIBLayer3

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer3

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTIBLayer4

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer4

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTID

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTID

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTOBLayer1

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer1

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTOBLayer2

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer2

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTOBLayer3

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer3

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTOBLayer4

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer4

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTOBLayer5

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer5

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrNoTOBLayer6

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer6

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageGmrOld_

ResidualRefitting::storage_muon ResidualRefitting::storageGmrOld_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageRecMuon_

ResidualRefitting::storage_hit ResidualRefitting::storageRecMuon_

Definition at line 240 of file ResidualRefitting.h.

Referenced by beginJob(), CollectTrackHits(), and zero_storage().

◆ storageSamNew_

ResidualRefitting::storage_muon ResidualRefitting::storageSamNew_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageSamNoSt1_

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt1_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageSamNoSt2_

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt2_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageSamNoSt3_

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt3_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageSamNoSt4_

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt4_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackExtrapRec_

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRec_

Definition at line 244 of file ResidualRefitting.h.

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

◆ storageTrackExtrapRecNoSt1_

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt1_

Definition at line 244 of file ResidualRefitting.h.

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

◆ storageTrackExtrapRecNoSt2_

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt2_

Definition at line 244 of file ResidualRefitting.h.

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

◆ storageTrackExtrapRecNoSt3_

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt3_

Definition at line 244 of file ResidualRefitting.h.

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

◆ storageTrackExtrapRecNoSt4_

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt4_

Definition at line 244 of file ResidualRefitting.h.

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

◆ storageTrackExtrapTracker_

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapTracker_

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackHit_

ResidualRefitting::storage_trackHit ResidualRefitting::storageTrackHit_

Definition at line 241 of file ResidualRefitting.h.

Referenced by beginJob(), CollectTrackHits(), StoreTrackerRecHits(), and zero_storage().

◆ storageTrackNoPXBLayer1

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXBLayer1

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoPXBLayer2

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXBLayer2

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoPXBLayer3

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXBLayer3

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoPXF

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXF

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTEC

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTEC

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTIBLayer1

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer1

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTIBLayer2

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer2

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTIBLayer3

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer3

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTIBLayer4

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer4

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTID

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTID

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTOBLayer1

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer1

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTOBLayer2

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer2

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTOBLayer3

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer3

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTOBLayer4

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer4

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTOBLayer5

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer5

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrackNoTOBLayer6

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer6

Definition at line 251 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNew_

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNew_

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoPXBLayer1

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXBLayer1

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoPXBLayer2

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXBLayer2

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoPXBLayer3

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXBLayer3

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoPXF

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXF

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTEC

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTEC

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTIBLayer1

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer1

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTIBLayer2

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer2

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTIBLayer3

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer3

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTIBLayer4

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer4

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTID

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTID

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTOBLayer1

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer1

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTOBLayer2

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer2

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTOBLayer3

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer3

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTOBLayer4

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer4

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTOBLayer5

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer5

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ storageTrkNoTOBLayer6

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer6

Definition at line 224 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

◆ TEC

const int ResidualRefitting::TEC = 6
staticprivate

Definition at line 48 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

◆ theField

const MagneticField* ResidualRefitting::theField

Definition at line 352 of file ResidualRefitting.h.

Referenced by analyze(), and freeTrajStateMuon().

◆ thePropagator

edm::ESHandle<Propagator> ResidualRefitting::thePropagator

Definition at line 355 of file ResidualRefitting.h.

Referenced by analyze(), cylExtrapTrkSam(), and trkExtrap().

◆ theService

MuonServiceProxy* ResidualRefitting::theService

◆ TIB

const int ResidualRefitting::TIB = 3
staticprivate

Definition at line 45 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

◆ TID

const int ResidualRefitting::TID = 4
staticprivate

Definition at line 46 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

◆ TOB

const int ResidualRefitting::TOB = 5
staticprivate

Definition at line 47 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> ResidualRefitting::topoToken_

Definition at line 325 of file ResidualRefitting.h.

Referenced by CollectTrackHits().

◆ trackExtrap120_

ResidualRefitting::storage_trackExtrap ResidualRefitting::trackExtrap120_

Definition at line 248 of file ResidualRefitting.h.

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

◆ trackingGeometry

const edm::ESHandle<GlobalTrackingGeometry> ResidualRefitting::trackingGeometry

Definition at line 353 of file ResidualRefitting.h.

◆ trackingGeometryToken_

const edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> ResidualRefitting::trackingGeometryToken_

Definition at line 326 of file ResidualRefitting.h.

Referenced by analyze().

◆ tracks_

edm::InputTag ResidualRefitting::tracks_

Definition at line 335 of file ResidualRefitting.h.