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::EDAnalyzer 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::EDAnalyzer
typedef EDAnalyzer 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_iterator hit1, trackingRecHit_iterator 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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
 
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::vector< ModuleDescription const * > &modules, 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
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

bool debug_
 
ResidualRefitting::storage_event eventInfo_
 
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_
 
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
 
ResidualRefitting::storage_trackExtrap trackExtrap120_
 
const edm::ESHandle< GlobalTrackingGeometrytrackingGeometry
 
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::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 40 of file ResidualRefitting.h.

Member Typedef Documentation

Constructor & Destructor Documentation

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

Definition at line 38 of file ResidualRefitting.cc.

References eventInfo_, ResidualRefitting::storage_event::evtNum_, edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, and theService.

38  :
39  outputFileName_ ( cfg.getUntrackedParameter<std::string>("histoutputFile") ),
40  PropagatorSource_ ( cfg.getParameter<std::string>("propagator")),
41  muons_ ( cfg.getParameter<edm::InputTag>( "muons" ) ),
42  muonsRemake_ ( cfg.getParameter<edm::InputTag>("muonsRemake" ) ), //This Feels Misalignment
43  muonsNoStation1_ ( cfg.getParameter<edm::InputTag>("muonsNoStation1") ),
44  muonsNoStation2_ ( cfg.getParameter<edm::InputTag>("muonsNoStation2") ),
45  muonsNoStation3_ ( cfg.getParameter<edm::InputTag>("muonsNoStation3") ),
46  muonsNoStation4_ ( cfg.getParameter<edm::InputTag>("muonsNoStation4") ),
47 
48 /*
49  muonsNoPXBLayer1_ ( cfg.getParameter<edm::InputTag>("muonsNoPXBLayer1" ) ),
50  muonsNoPXBLayer2_ ( cfg.getParameter<edm::InputTag>("muonsNoPXBLayer1" ) ),
51  muonsNoPXBLayer3_ ( cfg.getParameter<edm::InputTag>("muonsNoPXBLayer1" ) ),
52 
53  muonsNoTIBLayer1_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer1" ) ),
54  muonsNoTIBLayer2_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer2" ) ),
55  muonsNoTIBLayer3_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer3" ) ),
56  muonsNoTIBLayer4_ ( cfg.getParameter<edm::InputTag>("muonsNoTIBLayer4" ) ),
57 
58  muonsNoTOBLayer1_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer1" ) ),
59  muonsNoTOBLayer2_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer2" ) ),
60  muonsNoTOBLayer3_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer3" ) ),
61  muonsNoTOBLayer4_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer4" ) ),
62  muonsNoTOBLayer5_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer5" ) ),
63  muonsNoTOBLayer6_ ( cfg.getParameter<edm::InputTag>("muonsNoTOBLayer6" ) ),*/
64  debug_ ( cfg.getUntrackedParameter<bool>("doDebug" ) ),
65  outputFile_(nullptr),
66  outputTree_(nullptr),
67  outputBranch_(nullptr),
68  theField(nullptr)
69 {
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);
78 
79 } //The constructor
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string PropagatorSource_
const MagneticField * theField
edm::InputTag muonsNoStation2_
edm::InputTag muonsNoStation1_
MuonServiceProxy * theService
edm::InputTag muonsNoStation3_
std::string outputFileName_
edm::InputTag muonsRemake_
edm::InputTag muons_
ResidualRefitting::storage_event eventInfo_
edm::InputTag muonsNoStation4_
ResidualRefitting::~ResidualRefitting ( )
override

Definition at line 268 of file ResidualRefitting.cc.

References outputFile_, and theService.

268  {
269  delete outputFile_;
270  delete theService;
271 }
MuonServiceProxy * theService

Member Function Documentation

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

Definition at line 81 of file ResidualRefitting.cc.

References CollectTrackHits(), gather_cfg::cout, cylExtrapTrkSam(), debug_, dumpTrackRef(), edm::EventID::event(), eventInfo_, ResidualRefitting::storage_event::evtNum_, HcalObjRepresent::Fill(), edm::EventSetup::get(), edm::EventBase::id(), createfilelist::int, muonInfo(), nano_cff::muons, muons_, muonsNoStation1_, muonsNoStation2_, muonsNoStation3_, muonsNoStation4_, muonsRemake_, ResidualRefitting::StorageMuon::n_, ResidualRefitting::StorageTrackExtrap::n_, N_MAX_STORED, NewTrackMeasurements(), outputBranch_, outputTree_, PropagatorSource_, edm::EventID::run(), ResidualRefitting::storage_event::runNum_, samExtrap120_, storageGmrNew_, storageTrackExtrapRec_, storageTrackExtrapRecNoSt1_, storageTrackExtrapRecNoSt2_, storageTrackExtrapRecNoSt3_, storageTrackExtrapRecNoSt4_, theField, thePropagator, theService, trackExtrap120_, MuonServiceProxy::update(), and zero_storage().

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

Reimplemented from edm::EDAnalyzer.

Definition at line 1009 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_.

1009  {
1010 
1011  std::cout<<"Creating file "<< outputFileName_.c_str()<<std::endl;
1012 
1013  outputFile_ = new TFile( outputFileName_.c_str(), "RECREATE" ) ;
1014 
1015  outputTree_ = new TTree("outputTree","outputTree");
1016 
1017  outputTree_->Branch("eventInfo",&eventInfo_,
1018  "evtNum_/I:"
1019  "runNum_/I"
1020  );
1021 
1022 
1029 
1035 
1053 
1070 
1071  outputBranch_ = outputTree_ -> Branch("recHitsNew", &storageRecMuon_,
1072 
1073  "n_/I:"
1074  "muonLink_[1000]/I:"
1075 
1076  "system_[1000]/I:"
1077  "endcap_[1000]/I:"
1078  "station_[1000]/I:"
1079  "ring_[1000]/I:"
1080  "chamber_[1000]/I:"
1081  "layer_[1000]/I:"
1082  "superLayer_[1000]/I:"
1083  "wheel_[1000]/I:"
1084  "sector_[1000]/I:"
1085 
1086 
1087  "gpX_[1000]/F:"
1088  "gpY_[1000]/F:"
1089  "gpZ_[1000]/F:"
1090  "gpEta_[1000]/F:"
1091  "gpPhi_[1000]/F:"
1092  "lpX_[1000]/F:"
1093  "lpY_[1000]/F:"
1094  "lpZ_[1000]/F"
1095  );
1096 
1097 
1098  outputBranch_ = outputTree_ -> Branch("recHitsTracker", &storageTrackHit_,
1099 
1100  "n_/I:"
1101 
1102  "muonLink_[1000]/I:"
1103  "detector_[1000]/I:"
1104  "subdetector_[1000]/I:"
1105  "blade_[1000]/I:"
1106  "disk_[1000]/I:"
1107  "ladder_[1000]/I:"
1108  "layer_[1000]/I:"
1109  "module_[1000]/I:"
1110  "panel_[1000]/I:"
1111  "ring_[1000]/I:"
1112  "side_[1000]/I:"
1113  "wheel_[1000]/I:"
1114 
1115  "gpX_[1000]/F:"
1116  "gpY_[1000]/F:"
1117  "gpZ_[1000]/F:"
1118  "gpEta_[1000]/F:"
1119  "gpPhi_[1000]/F:"
1120  "lpX_[1000]/F:"
1121  "lpY_[1000]/F:"
1122  "lpZ_[1000]/F"
1123  );
1124 
1125 
1131 
1149 
1152 
1153 }
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_
void ResidualRefitting::branchMuon ( ResidualRefitting::storage_muon storageTmp,
std::string  branchName 
)

Definition at line 1157 of file ResidualRefitting.cc.

References outputBranch_, and outputTree_.

Referenced by beginJob().

1157  {
1158 
1159  outputBranch_ = outputTree_ -> Branch(branchName.c_str(), &storageTmp,
1160  "n_/I:"
1161  "charge_[10]/I:"
1162  "pt_[10]/F:"
1163  "eta_[10]/F:"
1164  "p_[10]/F:"
1165  "phi_[10]/F:"
1166  "numRecHits_[10]/I:"
1167  "chiSq_[10]/F:"
1168  "ndf_[10]/F:"
1169  "chiSqOvrNdf_[10]/F"
1170 
1171  );
1172 
1173 }
void ResidualRefitting::branchTrackExtrap ( ResidualRefitting::storage_trackExtrap storageTmp,
std::string  branchName 
)

Definition at line 1177 of file ResidualRefitting.cc.

References outputBranch_, and outputTree_.

Referenced by beginJob().

1177  {
1178 
1179  outputBranch_ = outputTree_ -> Branch(branchName.c_str(), &storageTmp,
1180  "n_/I:"
1181  "muonLink_[1000]/I:"
1182  "recLink_[1000]/I:"
1183  "gpX_[1000]/F:"
1184  "gpY_[1000]/F:"
1185  "gpZ_[1000]/F:"
1186  "gpEta_[1000]/F:"
1187  "gpPhi_[1000]/F:"
1188  "lpX_[1000]/F:"
1189  "lpY_[1000]/F:"
1190  "lpZ_[1000]/F:"
1191  "resX_[1000]/F:"
1192  "resY_[1000]/F:"
1193  "resZ_[1000]/F"
1194 
1195  );
1196 
1197 }
void ResidualRefitting::CollectTrackHits ( edm::Handle< reco::TrackCollection trackColl,
ResidualRefitting::storage_trackExtrap trackExtrap,
const edm::EventSetup eventSetup 
)

Definition at line 275 of file ResidualRefitting.cc.

References relativeConstraints::chamber, ResidualRefitting::StorageHit::chamber_, MuonSubdetId::CSC, debug_, DetId::det(), MuonSubdetId::DT, dumpTrackRef(), makeMuonMisalignmentScenario::endcap, ResidualRefitting::StorageHit::endcap_, freeTrajStateMuon(), edm::EventSetup::get(), 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(), 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_, edm::ESHandle< T >::product(), 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, 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().

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

Definition at line 818 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(), makeMuonMisalignmentScenario::rot, mathSSE::sqrt(), thePropagator, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

818  {
819 
822 
823  Cylinder::CylinderPointer myCylinder = Cylinder::build(pos, rot, rho);
824 // SteppingHelixPropagator inwardProp ( theField, oppositeToMomentum );
825 // SteppingHelixPropagator outwardProp ( theField, alongMomentum );
826  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
827 // TrajectoryStateOnSurface recoProp = outwardProp.propagate(recoStart, *myCylinder);
828  TrajectoryStateOnSurface recoProp = thePropagator->propagate(recoStart, *myCylinder);
829 
830  double xVal = -9999;
831  double yVal = -9999;
832  double zVal = -9999;
833  double phiVal = -9999;
834  double etaVal = -9999;
835 
836  if(recoProp.isValid()) {
837  GlobalPoint recoPoint = recoProp.globalPosition();
838  xVal = recoPoint.x();
839  yVal = recoPoint.y();
840  zVal = recoPoint.z();
841  phiVal = recoPoint.phi();
842  etaVal = recoPoint.eta();
843  }
844  storage.muonLink_[recNum] = recNum;
845  storage.gpX_ [recNum] = xVal;
846  storage.gpY_ [recNum] = yVal;
847  storage.gpZ_ [recNum] = zVal;
848  storage.gpEta_ [recNum] = etaVal;
849  storage.gpPhi_ [recNum] = phiVal;
850 
851  float rhoVal = sqrt( xVal*xVal + yVal*yVal);
852 
853  printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
854  if (debug_) printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
855 
856 
857 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
static CylinderPointer build(const PositionType &pos, const RotationType &rot, Scalar radius, Bounds *bounds=0)
Definition: Cylinder.h:51
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
T eta() const
Definition: PV3DBase.h:76
edm::ESHandle< Propagator > thePropagator
T x() const
Definition: PV3DBase.h:62
void ResidualRefitting::dumpMuonRecHits ( const ResidualRefitting::storage_hit hit)

Definition at line 1261 of file ResidualRefitting.cc.

References gather_cfg::cout, mps_fire::i, createfilelist::int, ResidualRefitting::StorageHit::lpX_, ResidualRefitting::StorageHit::lpY_, ResidualRefitting::StorageHit::lpZ_, ResidualRefitting::StorageHit::n_, ResidualRefitting::StorageHit::superLayer_, and ResidualRefitting::StorageHit::system_.

1261  {
1262  std::cout<<"Muon Rec Hits Dump:\n";
1263  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1264 
1265 // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1266 
1267  printf ("%d\tsubdetector = %d\t superLayer =%d" , i, (int)hit.system_[i], (int)hit.superLayer_[i] );
1268 // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1269 // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1270 // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1271 // printf ("\trho =%0.3f" , rho );
1272 // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1273 // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1274  printf ("\t\tLocal\tx = %0.3f" , (float)hit.lpX_[i] );
1275  printf ("\ty = %0.3f" , (float)hit.lpY_[i] );
1276  printf ("\tz = %0.3f\n" , (float)hit.lpZ_[i] );
1277 
1278  }
1279 
1280 }
float lpZ_[N_MAX_STORED_HIT]
float lpY_[N_MAX_STORED_HIT]
float lpX_[N_MAX_STORED_HIT]
int superLayer_[N_MAX_STORED_HIT]
int system_[N_MAX_STORED_HIT]
void ResidualRefitting::dumpTrackExtrap ( const ResidualRefitting::storage_trackExtrap track)

Definition at line 1237 of file ResidualRefitting.cc.

References gather_cfg::cout, mps_fire::i, createfilelist::int, ResidualRefitting::StorageTrackExtrap::lpX_, ResidualRefitting::StorageTrackExtrap::lpY_, ResidualRefitting::StorageTrackExtrap::lpZ_, ResidualRefitting::StorageTrackExtrap::muonLink_, ResidualRefitting::StorageTrackExtrap::n_, and ResidualRefitting::StorageTrackExtrap::recLink_.

1237  {
1238  std::cout<<"\n\nExtrapolation Dump:\n";
1239  for (unsigned int i = 0; i < (unsigned int)track.n_; i++) {
1240 
1241 // double rho = sqrt( (float)track.gpX_[i] * (float)track.gpX_[i] + (float)track.gpY_[i] * (float)track.gpY_[i] );
1242 
1243  printf ("%d\tmuonLink= %d",i, (int)track.muonLink_[i]);
1244  printf ("\trecLink = %d", (int)track.recLink_[i] );
1245 // printf ("\tGlobal\tx = %0.3f" , (float)track.gpX_[i] );
1246 // printf ("\ty = %0.3f" , (float)track.gpY_[i] );
1247 // printf ("\tz = %0.3f" , (float)track.gpZ_[i] );
1248 // printf ("\trho =%0.3f" , rho );
1249 // printf ("\teta = %0.3f" , (float)track.gpEta_[i] );
1250 // printf ("\tphi = %0.3f" , (float)track.gpPhi_[i] );
1251  printf ("\t\tLocal\tx = %0.3f" , (float)track.lpX_[i] );
1252  printf ("\ty = %0.3f" , (float)track.lpY_[i] );
1253  printf ("\tz = %0.3f\n" , (float)track.lpZ_[i] );
1254 
1255  }
1256 
1257 }
void ResidualRefitting::dumpTrackHits ( const ResidualRefitting::storage_trackHit hit)

Definition at line 1284 of file ResidualRefitting.cc.

References gather_cfg::cout, mps_fire::i, createfilelist::int, ResidualRefitting::StorageTrackHit::layer_, ResidualRefitting::StorageTrackHit::lpX_, ResidualRefitting::StorageTrackHit::lpY_, ResidualRefitting::StorageTrackHit::lpZ_, ResidualRefitting::StorageTrackHit::n_, and ResidualRefitting::StorageTrackHit::subdetector_.

1284  {
1285  std::cout<<"Tracker Rec Hits Dump:\n";
1286  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1287 
1288 // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1289 
1290  printf ("%d\tsubdetector = %d" , i, (int)hit.subdetector_[i] );
1291  printf ("\tlayer = %d" , (int)hit.layer_[i] );
1292 // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1293 // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1294 // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1295 // printf ("\trho =%0.3f" , rho );
1296 // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1297 // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1298  printf ("\t\tLocal\tx = %0.3f" , (float)hit.lpX_[i] );
1299  printf ("\ty = %0.3f" , (float)hit.lpY_[i] );
1300  printf ("\tz = %0.3f\n" , (float)hit.lpZ_[i] );
1301 
1302  }
1303 
1304 }
void ResidualRefitting::dumpTrackRef ( reco::TrackRef  muon,
std::string  str 
)

Definition at line 1308 of file ResidualRefitting.cc.

References DEFINE_FWK_MODULE, PVValHelper::eta, AlCaHLTBitMon_ParallelJobs::p, phi, and EnergyCorrector::pt.

Referenced by analyze(), and CollectTrackHits().

1308  {
1309 
1310  float pt = muon->pt();
1311  float p = muon->p ();
1312  float eta = muon->eta();
1313  float phi = muon->phi();
1314  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);
1315 
1316 }
void ResidualRefitting::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1201 of file ResidualRefitting.cc.

References outputFile_.

Referenced by o2olib.O2ORunMgr::executeJob().

1201  {
1202 
1203 
1204  outputFile_ -> Write();
1205 
1206  outputFile_ -> Close() ;
1207 
1208 }
FreeTrajectoryState ResidualRefitting::freeTrajStateMuon ( reco::TrackRef  muon)

Definition at line 1212 of file ResidualRefitting.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, gather_cfg::cout, debug_, and theField.

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

1212  {
1213 
1214  math::XYZPoint innerPos = muon -> referencePoint();
1215  math::XYZVector innerMom = muon -> momentum();
1216  if (debug_) std::cout << "Inner Pos: "
1217  << "\tx = " << innerPos.X()
1218  << "\ty = " << innerPos.Y()
1219  << "\tz = " << innerPos.Z()
1220  << std::endl;
1221 
1222  GlobalPoint innerPoint( innerPos.X(), innerPos.Y(), innerPos.Z());
1223  GlobalVector innerVec ( innerMom.X(), innerMom.Y(), innerMom.Z());
1224 
1225  FreeTrajectoryState recoStart( innerPoint, innerVec, muon ->charge(), theField );
1226  return recoStart;
1227 
1228 }
const MagneticField * theField
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
bool ResidualRefitting::IsSameHit ( trackingRecHit_iterator  hit1,
trackingRecHit_iterator  hit2 
)

Definition at line 546 of file ResidualRefitting.cc.

References MillePedeFileConverter_cfg::e.

Referenced by MatchTrackWithRecHits(), and NewTrackMeasurements().

546  {
547 
548 
549  double lpx1 = (*hit1)->localPosition().x();
550  double lpy1 = (*hit1)->localPosition().y();
551  double lpz1 = (*hit1)->localPosition().z();
552 
553  double lpx2 = (*hit2)->localPosition().x();
554  double lpy2 = (*hit2)->localPosition().y();
555  double lpz2 = (*hit2)->localPosition().z();
556  if ( fabs( lpx1 - lpx2) > 1e-3) return false;
557 // printf("Match lpx...\n");
558  if ( fabs( lpy1 - lpy2) > 1e-3) return false;
559 // printf("Match lpy...\n");
560  if ( fabs( lpz1 - lpz2) > 1e-3) return false;
561 // printf("Match lpz...\n");
562 
563  return true;
564 
565 }
int ResidualRefitting::MatchTrackWithRecHits ( reco::TrackCollection::const_iterator  trackIt,
edm::Handle< reco::TrackCollection ref 
)

Definition at line 478 of file ResidualRefitting.cc.

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

Referenced by NewTrackMeasurements().

479  {
480 
481  if (debug_) printf("Matching a re-fitted track to the original track.\n");
482 
483  int TrackMatch = -1;
484 
485  for (trackingRecHit_iterator rec = trackIt->recHitsBegin(); rec!=trackIt->recHitsEnd(); rec++) {
486 
487  bool foundMatch = false;
488  for (reco::TrackCollection::const_iterator refIt = ref->begin(); refIt!=ref->end(); refIt++) {
489 
490  int iTrackMatch = refIt - ref->begin();
491  if (foundMatch && TrackMatch !=iTrackMatch) break;
492  for (trackingRecHit_iterator recRef = refIt->recHitsBegin(); recRef!=refIt->recHitsEnd(); recRef++) {
493 
494  if (!IsSameHit(rec,recRef)) continue;
495 
496  foundMatch = true;
497  TrackMatch = iTrackMatch;
498  // printf("Rec hit match for original track %d\n", iTrackMatch);
499 
500  }
501  }
502  if (!foundMatch) {
503  printf("SOMETHING WENT WRONG! Could not match Track with original track!");
504  exit(1);
505  }
506 
507  }
508  if (debug_) printf("Rec hit match for original track %d\n", TrackMatch);
509 
510 // reco::TrackRef trackref=reco::TrackRef(ref,TrackMatch);
511  return TrackMatch;
512 }
bool IsSameHit(trackingRecHit_iterator hit1, trackingRecHit_iterator hit2)
void ResidualRefitting::muonInfo ( ResidualRefitting::storage_muon storeMuon,
reco::TrackRef  muon,
int  val 
)

Definition at line 674 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().

674  {
675 
676 
677  storeMuon.pt_ [val] = muon->pt();
678  storeMuon.p_ [val] = muon->p();
679  storeMuon.eta_[val] = muon->eta();
680  storeMuon.phi_[val] = muon->phi();
681  storeMuon.charge_[val] = muon->charge();
682  storeMuon.numRecHits_[val] = muon->numberOfValidHits();
683  storeMuon.chiSq_[val] = muon->chi2();
684  storeMuon.ndf_[val] = muon->ndof();
685  storeMuon.chiSqOvrNdf_[val] = muon->normalizedChi2();
686 
687 }
float chiSqOvrNdf_[N_MAX_STORED]
void ResidualRefitting::NewTrackMeasurements ( edm::Handle< reco::TrackCollection trackCollOrig,
edm::Handle< reco::TrackCollection trackColl,
ResidualRefitting::storage_trackExtrap trackExtrap 
)

Definition at line 428 of file ResidualRefitting.cc.

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

Referenced by analyze().

429  {
430 
431  int numTracks = 0;
432  int recCounter = 0;
433 
434  for ( reco::TrackCollection::const_iterator muon = trackColl->begin(); muon!=trackColl->end(); muon++) {
435 
436  int iTrack = muon - trackColl->begin();
437 
438  reco::TrackRef trackref=reco::TrackRef(trackColl,iTrack);
440 
441  int iTrackLink = MatchTrackWithRecHits(muon,trackCollOrig);
442  reco::TrackRef ref = reco::TrackRef(trackCollOrig, iTrackLink);
443 
444  for (trackingRecHit_iterator rec1 = ref->recHitsBegin(); rec1!= ref->recHitsEnd(); rec1++, recCounter++) {
445 
446  //int iRec = rec1 - ref->recHitsBegin();
447 
448  bool unbiasedRec = true;
449 
450  for ( trackingRecHit_iterator rec2 = muon->recHitsBegin(); rec2!=muon->recHitsEnd();rec2++) {
451 
452  if (IsSameHit(rec1,rec2)) {
453  unbiasedRec = false;
454  break;
455  }
456  }
457  if (!unbiasedRec) continue;
458 
459  DetId detid = (*rec1)->geographicalId();
460 
463  ,&(**rec1));
464 
465  trkExtrap(detid, numTracks, iTrackLink, recCounter, recoStart, (*rec1)->localPosition(), trackExtrap);
466  numTracks++;
467 
468  }
469 
470  }
471 
472  trackExtrap.n_ = numTracks;
473 
474 }
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)
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
MuonServiceProxy * theService
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
Definition: DetId.h:18
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
bool IsSameHit(trackingRecHit_iterator hit1, trackingRecHit_iterator hit2)
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
const GeomDet * idToDet(DetId) const override
static MuonRecHitPointer specificBuild(const GeomDet *geom, const TrackingRecHit *rh)
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 
)
void ResidualRefitting::omitTrackerSystem ( edm::Handle< reco::MuonCollection trkMuons,
ResidualRefitting::storage_muon storeGmr,
ResidualRefitting::storage_muon storeTrk,
ResidualRefitting::storage_trackExtrap storeExtrap,
int  omitSystem 
)
int ResidualRefitting::ReturnSector ( DetId  detid)

Definition at line 797 of file ResidualRefitting.cc.

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

Referenced by trkExtrap().

797  {
798 
799  int sector = -999;
800 
801  if (detid.det() == DetId::Muon) {
802 
803  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
804  if ( systemMuon == MuonSubdetId::DT ) {
805  DTWireId id(detid.rawId());
806  sector = id.sector();
807 
808  }
809 
810  }
811 
812  return sector;
813 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
static const int DT
Definition: MuonSubdetId.h:12
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
int ResidualRefitting::ReturnStation ( DetId  detid)

Definition at line 768 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().

768  {
769 
770  int station = -999;
771 
772  if (detid.det() == DetId::Muon) {
773 
774  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
775  if ( systemMuon == MuonSubdetId::CSC) {
776  CSCDetId id(detid.rawId());
777  station = id.station();
778 
779  }
780  else if ( systemMuon == MuonSubdetId::DT ) {
781  DTWireId id(detid.rawId());
782  station = id.station();
783 
784  }
785  else if ( systemMuon == MuonSubdetId::RPC) {
786  RPCDetId id(detid.rawId());
787  station = id.station();
788  }
789 
790  }
791 
792  return station;
793 }
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static const int CSC
Definition: MuonSubdetId.h:13
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
void ResidualRefitting::StoreTrackerRecHits ( DetId  detid,
const TrackerTopology tTopo,
int  iTrack,
int  iRec 
)

Definition at line 570 of file ResidualRefitting.cc.

References ResidualRefitting::StorageTrackHit::blade_, gather_cfg::cout, debug_, DetId::det(), gamEcalExtractorBlocks_cff::detector, ResidualRefitting::StorageTrackHit::detector_, ResidualRefitting::StorageTrackHit::disk_, PVValHelper::ladder, ResidualRefitting::StorageTrackHit::ladder_, ResidualRefitting::StorageTrackHit::layer_, python.rootplot.argparse::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().

570  {
571 
572 
573  int detector = -1;
574  int subdetector = -1;
575  int blade = -1;
576  int disk = -1;
577  int ladder = -1;
578  int layer = -1;
579  int module = -1;
580  int panel = -1;
581  int ring = -1;
582  int side = -1;
583  int wheel = -1;
584 
585 //Detector Info
586 
587  detector = detid.det();
588  subdetector = detid.subdetId();
589 
590  if (detector != DetId::Tracker) {
591  std::cout<<"OMFG NOT THE TRACKER\n"<<std::endl;
592  return;
593  }
594 
595  if (debug_) std::cout<<"Tracker:: ";
596  if (subdetector == ResidualRefitting::PXB) {
597  layer = tTopo->pxbLayer(detid.rawId());
598  ladder = tTopo->pxbLadder(detid.rawId());
599  module = tTopo->pxbModule(detid.rawId());
600  if (debug_) std::cout << "PXB"
601  << "\tlayer = " << layer
602  << "\tladder = " << ladder
603  << "\tmodule = " << module;
604 
605  }
606  else if (subdetector == ResidualRefitting::PXF) {
607  side = tTopo->pxfSide(detid.rawId());
608  disk = tTopo->pxfDisk(detid.rawId());
609  blade = tTopo->pxfBlade(detid.rawId());
610  panel = tTopo->pxfPanel(detid.rawId());
611  module = tTopo->pxfModule(detid.rawId());
612  if (debug_) std::cout << "PXF"
613  << "\tside = " << side
614  << "\tdisk = " << disk
615  << "\tblade = " << blade
616  << "\tpanel = " << panel
617  << "\tmodule = " << module;
618 
619  }
620  else if (subdetector == ResidualRefitting::TIB) {
621  layer = tTopo->tibLayer(detid.rawId());
622  module = tTopo->tibModule(detid.rawId());
623  if (debug_) std::cout << "TIB"
624  << "\tlayer = " << layer
625  << "\tmodule = "<< module;
626  }
627  else if (subdetector == ResidualRefitting::TID) {
628  side = tTopo->tidSide(detid.rawId());
629  wheel = tTopo->tidWheel(detid.rawId());
630  ring = tTopo->tidRing(detid.rawId());
631  if (debug_) std::cout <<"TID"
632  << "\tside = " << side
633  << "\twheel = " << wheel
634  << "\tring = " << ring;
635 
636  }
637  else if (subdetector == ResidualRefitting::TOB) {
638  layer = tTopo->tobLayer(detid.rawId());
639  module = tTopo->tobModule(detid.rawId());
640  if (debug_) std::cout <<"TOB"
641  <<"\tlayer = " << layer
642  <<"\tmodule = " << module;
643 
644  }
645  else if (subdetector == ResidualRefitting::TEC) {
646  ring = tTopo->tecRing(detid.rawId());
647  module = tTopo->tecModule(detid.rawId());
648  if (debug_) std::cout <<"TEC"
649  << "\tring = " << ring
650  << "\tmodule = "<< module;
651  }
652 
653 
654 //Do Storage
655 
656  storageTrackHit_.muonLink_ [iRec] =iTrack ;
659  storageTrackHit_.blade_ [iRec] =blade ;
660  storageTrackHit_.disk_ [iRec] =disk ;
662  storageTrackHit_.layer_ [iRec] =layer ;
664  storageTrackHit_.panel_ [iRec] =panel ;
665  storageTrackHit_.ring_ [iRec] =ring ;
666  storageTrackHit_.side_ [iRec] =side ;
667  storageTrackHit_.wheel_ [iRec] =wheel ;
668 
669 }
static const int TIB
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
TString subdetector
unsigned int pxfDisk(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
static const int PXB
ResidualRefitting::storage_trackHit storageTrackHit_
unsigned int pxbLadder(const DetId &id) const
static const int TOB
unsigned int tidWheel(const DetId &id) const
unsigned int pxbModule(const DetId &id) const
static const int TEC
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
static const int TID
unsigned int tidSide(const DetId &id) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
unsigned int tibModule(const DetId &id) const
unsigned int pxfModule(const DetId &id) const
unsigned int pxbLayer(const DetId &id) const
unsigned int tecModule(const DetId &id) const
static const int PXF
unsigned int tobModule(const DetId &id) const
unsigned int pxfSide(const DetId &id) const
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
Definition: vlib.h:208
unsigned int pxfPanel(const DetId &id) const
unsigned int pxfBlade(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
void ResidualRefitting::trkExtrap ( const DetId detid,
int  iTrkLink,
int  iTrk,
int  iRec,
const FreeTrajectoryState freeTrajState,
const LocalPoint recPoint,
storage_trackExtrap storeTemp 
)

Definition at line 691 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(), create_public_lumi_plots::loc, 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().

694  {
695 
696  bool dump_ = debug_;
697 
698  if (dump_) std::cout<< "In the trkExtrap function"<<std::endl;
699 
700  float gpExtrapX = -99999;
701  float gpExtrapY = -99999;
702  float gpExtrapZ = -99999;
703  float gpExtrapEta = -99999;
704  float gpExtrapPhi = -99999;
705 
706  float lpX = -99999;
707  float lpY = -99999;
708  float lpZ = -99999;
709 
710  //
711  // Get the local positions for the recHits
712  //
713 
714  float recLpX = recPoint.x();
715  float recLpY = recPoint.y();
716  float recLpZ = recPoint.z();
717 
718  float resX = -9999;
719  float resY = -9999;
720  float resZ = -9999;
721 
722  const GeomDet* gdet = theService->trackingGeometry()->idToDet(detid);
723 
724 // TrajectoryStateOnSurface surfTest = prop.propagate(freeTrajState, gdet->surface());
725  TrajectoryStateOnSurface surfTest = thePropagator->propagate(freeTrajState, gdet->surface());
726 
727  if (surfTest.isValid()) {
728 
729  GlobalPoint globTest = surfTest.globalPosition();
730  gpExtrapX = globTest.x();
731  gpExtrapY = globTest.y();
732  gpExtrapZ = globTest.z();
733  gpExtrapEta = globTest.eta();
734  gpExtrapPhi = globTest.phi();
735  LocalPoint loc = surfTest.localPosition();
736  if (detid.det() == DetId::Muon || detid.det() == DetId::Tracker) {
737  lpX = loc.x();
738  lpY = loc.y();
739  lpZ = loc.z();
740 
741  resX = lpX - recLpX;
742  resY = lpY - recLpY;
743  resZ = lpZ - recLpZ;
744 
745  }
746 
747  }
748  storeTemp.muonLink_ [iTrk] = iTrkLink ;
749  storeTemp.recLink_ [iTrk] = iRec ;
750  storeTemp.gpX_ [iTrk] = gpExtrapX ;
751  storeTemp.gpY_ [iTrk] = gpExtrapY ;
752  storeTemp.gpZ_ [iTrk] = gpExtrapZ ;
753  storeTemp.gpEta_ [iTrk] = gpExtrapEta;
754  storeTemp.gpPhi_ [iTrk] = gpExtrapPhi;
755  storeTemp.lpX_ [iTrk] = lpX ;
756  storeTemp.lpY_ [iTrk] = lpY ;
757  storeTemp.lpZ_ [iTrk] = lpZ ;
758  storeTemp.resX_ [iTrk] = resX ;
759  storeTemp.resY_ [iTrk] = resY ;
760  storeTemp.resZ_ [iTrk] = resZ ;
761 
762  printf("station: %d\tsector: %d\tresX storage: %4.2f\n", ReturnStation(detid), ReturnSector(detid), resX);
763 
764 }
int ReturnStation(DetId detid)
int ReturnSector(DetId detid)
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
T z() const
Definition: PV3DBase.h:64
MuonServiceProxy * theService
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
Definition: Propagator.h:53
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
T eta() const
Definition: PV3DBase.h:76
const GeomDet * idToDet(DetId) const override
edm::ESHandle< Propagator > thePropagator
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
T x() const
Definition: PV3DBase.h:62
void ResidualRefitting::zero_muon ( ResidualRefitting::storage_muon str)

Definition at line 965 of file ResidualRefitting.cc.

References ResidualRefitting::StorageMuon::chiSq_, ResidualRefitting::StorageMuon::chiSqOvrNdf_, ResidualRefitting::StorageMuon::eta_, mps_fire::i, ResidualRefitting::StorageMuon::n_, N_MAX_STORED, ResidualRefitting::StorageMuon::ndf_, ResidualRefitting::StorageMuon::numRecHits_, ResidualRefitting::StorageMuon::p_, ResidualRefitting::StorageMuon::phi_, and ResidualRefitting::StorageMuon::pt_.

Referenced by zero_storage().

965  {
966 
967  str->n_ = 0;
968 
969  for (int i = 0; i < ResidualRefitting::N_MAX_STORED; i++) {
970 
971  str->pt_ [i] = -9999;
972  str->eta_ [i] = -9999;
973  str->p_ [i] = -9999;
974  str->phi_ [i] = -9999;
975  str->numRecHits_ [i] = -9999;
976  str->chiSq_ [i] = -9999;
977  str->ndf_ [i] = -9999;
978  str->chiSqOvrNdf_ [i] = -9999;
979  }
980 
981 }
static const int N_MAX_STORED
float chiSqOvrNdf_[N_MAX_STORED]
void ResidualRefitting::zero_storage ( )

Definition at line 865 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().

865  {
866  if (debug_) printf("zero_storage\n");
867 
880 //zero out the tracker
884 
886 
891 
893 
900 
902 
906 
908 
913 
915 
922 
924 
931 
933 
935 
939 
941 
946 
953 
955 
957 
958  storageRecMuon_ .n_ = 0;
959  storageTrackHit_ .n_ = 0;
960 
961 }
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_
void ResidualRefitting::zero_trackExtrap ( ResidualRefitting::storage_trackExtrap str)

Definition at line 985 of file ResidualRefitting.cc.

References ResidualRefitting::StorageTrackExtrap::gpEta_, ResidualRefitting::StorageTrackExtrap::gpPhi_, ResidualRefitting::StorageTrackExtrap::gpX_, ResidualRefitting::StorageTrackExtrap::gpY_, ResidualRefitting::StorageTrackExtrap::gpZ_, mps_fire::i, ResidualRefitting::StorageTrackExtrap::lpX_, ResidualRefitting::StorageTrackExtrap::lpY_, ResidualRefitting::StorageTrackExtrap::lpZ_, ResidualRefitting::StorageTrackExtrap::muonLink_, ResidualRefitting::StorageTrackExtrap::n_, N_MAX_STORED_HIT, ResidualRefitting::StorageTrackExtrap::recLink_, ResidualRefitting::StorageTrackExtrap::resX_, ResidualRefitting::StorageTrackExtrap::resY_, and ResidualRefitting::StorageTrackExtrap::resZ_.

Referenced by zero_storage().

985  {
986 
987  str->n_ = 0;
988  for (int i = 0; i < ResidualRefitting::N_MAX_STORED_HIT; i++) {
989 
990  str->muonLink_ [i] = -9999;
991  str->recLink_ [i] = -9999;
992  str->gpX_ [i] = -9999;
993  str->gpY_ [i] = -9999;
994  str->gpZ_ [i] = -9999;
995  str->gpEta_ [i] = -9999;
996  str->gpPhi_ [i] = -9999;
997  str->lpX_ [i] = -9999;
998  str->lpY_ [i] = -9999;
999  str->lpZ_ [i] = -9999;
1000  str->resX_ [i] = -9999;
1001  str->resY_ [i] = -9999;
1002  str->resZ_ [i] = -9999;
1003  }
1004 
1005 }
static const int N_MAX_STORED_HIT

Member Data Documentation

bool ResidualRefitting::debug_
ResidualRefitting::storage_event ResidualRefitting::eventInfo_

Definition at line 63 of file ResidualRefitting.h.

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

edm::InputTag ResidualRefitting::muons_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze().

edm::InputTag ResidualRefitting::muonsNoPXBLayer1_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoPXBLayer2_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoPXBLayer3_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoPXF_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoStation1_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze().

edm::InputTag ResidualRefitting::muonsNoStation2_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze().

edm::InputTag ResidualRefitting::muonsNoStation3_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze().

edm::InputTag ResidualRefitting::muonsNoStation4_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze().

edm::InputTag ResidualRefitting::muonsNoTEC_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTIBLayer1_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTIBLayer2_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTIBLayer3_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTIBLayer4_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTID_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTOBLayer1_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTOBLayer2_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTOBLayer3_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTOBLayer4_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTOBLayer5_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsNoTOBLayer6_

Definition at line 347 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::muonsRemake_

Definition at line 347 of file ResidualRefitting.h.

Referenced by analyze().

const int ResidualRefitting::N_MAX_STORED = 10
staticprivate
const int ResidualRefitting::N_MAX_STORED_HIT = 1000
staticprivate
TBranch* ResidualRefitting::outputBranch_

Definition at line 365 of file ResidualRefitting.h.

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

TFile* ResidualRefitting::outputFile_

Definition at line 362 of file ResidualRefitting.h.

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

std::string ResidualRefitting::outputFileName_

Definition at line 342 of file ResidualRefitting.h.

Referenced by beginJob().

TTree* ResidualRefitting::outputTree_

Definition at line 364 of file ResidualRefitting.h.

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

std::string ResidualRefitting::PropagatorSource_

Definition at line 344 of file ResidualRefitting.h.

Referenced by analyze().

const int ResidualRefitting::PXB = 1
staticprivate

Definition at line 45 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

const int ResidualRefitting::PXF = 2
staticprivate

Definition at line 46 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

ResidualRefitting::storage_trackExtrap ResidualRefitting::samExtrap120_

Definition at line 268 of file ResidualRefitting.h.

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

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNew_

Definition at line 238 of file ResidualRefitting.h.

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

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXBLayer1

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXBLayer2

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXBLayer3

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoPXF

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt1_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt2_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt3_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoSt4_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTEC

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer1

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer2

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer3

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTIBLayer4

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTID

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer1

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer2

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer3

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer4

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer5

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrNoTOBLayer6

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageGmrOld_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_hit ResidualRefitting::storageRecMuon_

Definition at line 260 of file ResidualRefitting.h.

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

ResidualRefitting::storage_muon ResidualRefitting::storageSamNew_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt1_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt2_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt3_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageSamNoSt4_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRec_

Definition at line 264 of file ResidualRefitting.h.

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

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt1_

Definition at line 264 of file ResidualRefitting.h.

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

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt2_

Definition at line 264 of file ResidualRefitting.h.

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

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt3_

Definition at line 264 of file ResidualRefitting.h.

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

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapRecNoSt4_

Definition at line 264 of file ResidualRefitting.h.

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

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackExtrapTracker_

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackHit ResidualRefitting::storageTrackHit_

Definition at line 261 of file ResidualRefitting.h.

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

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXBLayer1

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXBLayer2

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXBLayer3

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoPXF

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTEC

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer1

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer2

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer3

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTIBLayer4

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTID

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer1

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer2

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer3

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer4

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer5

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_trackExtrap ResidualRefitting::storageTrackNoTOBLayer6

Definition at line 271 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNew_

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXBLayer1

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXBLayer2

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXBLayer3

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoPXF

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTEC

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer1

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer2

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer3

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTIBLayer4

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTID

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer1

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer2

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer3

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer4

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer5

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

ResidualRefitting::storage_muon ResidualRefitting::storageTrkNoTOBLayer6

Definition at line 238 of file ResidualRefitting.h.

Referenced by beginJob(), and zero_storage().

const int ResidualRefitting::TEC = 6
staticprivate

Definition at line 50 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

const MagneticField* ResidualRefitting::theField

Definition at line 369 of file ResidualRefitting.h.

Referenced by analyze(), and freeTrajStateMuon().

edm::ESHandle<Propagator> ResidualRefitting::thePropagator

Definition at line 372 of file ResidualRefitting.h.

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

MuonServiceProxy* ResidualRefitting::theService
const int ResidualRefitting::TIB = 3
staticprivate

Definition at line 47 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

const int ResidualRefitting::TID = 4
staticprivate

Definition at line 48 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

const int ResidualRefitting::TOB = 5
staticprivate

Definition at line 49 of file ResidualRefitting.h.

Referenced by StoreTrackerRecHits().

ResidualRefitting::storage_trackExtrap ResidualRefitting::trackExtrap120_

Definition at line 268 of file ResidualRefitting.h.

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

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

Definition at line 370 of file ResidualRefitting.h.

edm::InputTag ResidualRefitting::tracks_

Definition at line 347 of file ResidualRefitting.h.