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 const &hit1, TrackingRecHit const &hit2)
 
int MatchTrackWithRecHits (reco::TrackCollection::const_iterator trackIt, edm::Handle< reco::TrackCollection > ref)
 
void muonInfo (ResidualRefitting::storage_muon &storeMuon, reco::TrackRef muon, int val)
 
void NewTrackMeasurements (edm::Handle< reco::TrackCollection > trackCollOrig, edm::Handle< reco::TrackCollection > trackColl, ResidualRefitting::storage_trackExtrap &trackExtrap)
 
void omitStation (edm::Handle< reco::MuonCollection > funcMuons, edm::Handle< reco::TrackCollection >, ResidualRefitting::storage_muon &storeGmr, ResidualRefitting::storage_muon &storeSam, ResidualRefitting::storage_trackExtrap &storeExtrap, int omitStation)
 
void omitTrackerSystem (edm::Handle< reco::MuonCollection > trkMuons, ResidualRefitting::storage_muon &storeGmr, ResidualRefitting::storage_muon &storeTrk, ResidualRefitting::storage_trackExtrap &storeExtrap, int omitSystem)
 
 ResidualRefitting (const edm::ParameterSet &)
 
int ReturnSector (DetId detid)
 
int ReturnStation (DetId detid)
 
void StoreTrackerRecHits (DetId detid, const TrackerTopology *tTopo, int iTrack, int iRec)
 
void trkExtrap (const DetId &detid, int iTrkLink, int iTrk, int iRec, const FreeTrajectoryState &freeTrajState, const LocalPoint &recPoint, storage_trackExtrap &storeTemp)
 
void zero_muon (ResidualRefitting::storage_muon *str)
 
void zero_storage ()
 
void zero_trackExtrap (ResidualRefitting::storage_trackExtrap *str)
 
 ~ResidualRefitting () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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(), extraflags_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)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:21
edm::InputTag muons_
edm::EventID id() const
Definition: EventBase.h:59
T get() const
Definition: EventSetup.h:71
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 1006 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_.

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

References outputBranch_, and outputTree_.

Referenced by beginJob().

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

Definition at line 1174 of file ResidualRefitting.cc.

References outputBranch_, and outputTree_.

Referenced by beginJob().

1174  {
1175 
1176  outputBranch_ = outputTree_ -> Branch(branchName.c_str(), &storageTmp,
1177  "n_/I:"
1178  "muonLink_[1000]/I:"
1179  "recLink_[1000]/I:"
1180  "gpX_[1000]/F:"
1181  "gpY_[1000]/F:"
1182  "gpZ_[1000]/F:"
1183  "gpEta_[1000]/F:"
1184  "gpPhi_[1000]/F:"
1185  "lpX_[1000]/F:"
1186  "lpY_[1000]/F:"
1187  "lpZ_[1000]/F:"
1188  "resX_[1000]/F:"
1189  "resY_[1000]/F:"
1190  "resZ_[1000]/F"
1191 
1192  );
1193 
1194 }
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_, PV3DBase< T, PVType, FrameType >::eta(), 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_, PV3DBase< T, PVType, FrameType >::phi(), 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  int iRec = 0;
297  for(auto const& rec : muon->recHits()) {
298 
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 
314  theService->trackingGeometry()->idToDet(rec->geographicalId()),rec);
315 
316  GlobalPoint gp = mrhp->globalPosition();
317  float gpRecX = gp.x();
318  float gpRecY = gp.y();
319  float gpRecZ = gp.z();
320  float gpRecEta = gp.eta();
321  float gpRecPhi = gp.phi();
322 
323  if (detid.det() == DetId::Muon) {
324 
325  int systemMuon = detid.subdetId(); // 1 DT; 2 CSC; 3 RPC
326  int endcap = -999;
327  int station = -999;
328  int ring = -999;
329  int chamber = -999;
330  int layer = -999;
331  int superLayer = -999;
332  int wheel = -999;
333  int sector = -999;
334  if ( systemMuon == MuonSubdetId::CSC) {
335  CSCDetId id(detid.rawId());
336  endcap = id.endcap();
337  station = id.station();
338  ring = id.ring();
339  chamber = id.chamber();
340  layer = id.layer();
341  if (debug_)printf("CSC\t[endcap][station][ringN][chamber][layer]:[%d][%d][%d][%d][%d]\t",
342  endcap, station, ring, chamber, layer);
343 
344  }
345  else if ( systemMuon == MuonSubdetId::DT ) {
346  DTWireId id(detid.rawId());
347  station = id.station();
348  layer = id.layer();
349  superLayer = id.superLayer();
350  wheel = id.wheel();
351  sector = id.sector();
352  if (debug_) printf("DT \t[station][layer][superlayer]:[%d][%d][%d]\n", station,layer,superLayer);
353 
354  }
355  else if ( systemMuon == MuonSubdetId::RPC) {
356  RPCDetId id(detid.rawId());
357  station = id.station();
358  if (debug_) printf("RPC\t[station]:[%d]\n", station);
359  }
360 
361 
362  storageRecMuon_.muonLink_ [iMuonHit] = iTrack;
363  storageRecMuon_.system_ [iMuonHit] = systemMuon;
364  storageRecMuon_.endcap_ [iMuonHit] = endcap;
365  storageRecMuon_.station_ [iMuonHit] = station;
366  storageRecMuon_.ring_ [iMuonHit] = ring;
367  storageRecMuon_.chamber_ [iMuonHit] = chamber;
368  storageRecMuon_.layer_ [iMuonHit] = layer;
369  storageRecMuon_.superLayer_ [iMuonHit] = superLayer;
370  storageRecMuon_.wheel_ [iMuonHit] = wheel;
371  storageRecMuon_.sector_ [iMuonHit] = sector;
372 
373  storageRecMuon_.gpX_ [iMuonHit] = gpRecX;
374  storageRecMuon_.gpY_ [iMuonHit] = gpRecY;
375  storageRecMuon_.gpZ_ [iMuonHit] = gpRecZ;
376  storageRecMuon_.gpEta_ [iMuonHit] = gpRecEta;
377  storageRecMuon_.gpPhi_ [iMuonHit] = gpRecPhi;
378  storageRecMuon_.lpX_ [iMuonHit] = lpX;
379  storageRecMuon_.lpY_ [iMuonHit] = lpY;
380  storageRecMuon_.lpZ_ [iMuonHit] = lpZ;
381  iMuonHit++;
382 
383  }
384  else if (detid.det() == DetId::Tracker) {
385 
386  if (debug_) printf("Tracker\n");
387 
388  StoreTrackerRecHits(detid, tTopo, iTrack, iTrackHit);
389 
390  storageTrackHit_.gpX_ [iTrackHit] = gpRecX;
391  storageTrackHit_.gpY_ [iTrackHit] = gpRecY;
392  storageTrackHit_.gpZ_ [iTrackHit] = gpRecZ;
393  storageTrackHit_.gpEta_ [iTrackHit] = gpRecEta;
394  storageTrackHit_.gpPhi_ [iTrackHit] = gpRecPhi;
395  storageTrackHit_.lpX_ [iTrackHit] = lpX;
396  storageTrackHit_.lpY_ [iTrackHit] = lpY;
397  storageTrackHit_.lpZ_ [iTrackHit] = lpZ;
398  iTrackHit++;
399  }
400  else printf("THIS CAN NOT HAPPEN\n");
401 
402  trkExtrap(detid, numTracks, iTrack, iRec, recoStart, lp, trackExtrap);
403  numTracks++;
404 
405  if (debug_) printf("\tLocal Positon: \tx = %2.2f\ty = %2.2f\tz = %2.2f\n",lpX, lpY, lpZ);
406  if (debug_) printf("\tGlobal Position: \tx = %6.2f\ty = %6.2f\tz = %6.2f\teta = %4.2f\tphi = %3.2f\n",
407  gpRecX,gpRecY,gpRecZ,gpRecEta,gpRecPhi);
408 
409 
410  ++iRec;
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_
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
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]
float lpX_[N_MAX_STORED_HIT]
int wheel_[N_MAX_STORED_HIT]
T z() const
Definition: PV3DBase.h:64
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
float gpY_[N_MAX_STORED_HIT]
MuonServiceProxy * theService
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
Definition: DetId.h:18
float gpX_[N_MAX_STORED_HIT]
int station_[N_MAX_STORED_HIT]
float gpPhi_[N_MAX_STORED_HIT]
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:21
static constexpr int RPC
Definition: MuonSubdetId.h:14
edm::ESHandle< GlobalTrackingGeometry > trackingGeometry() const
get the tracking geometry
T eta() const
Definition: PV3DBase.h:76
T get() const
Definition: EventSetup.h:71
const GeomDet * idToDet(DetId) const override
float gpZ_[N_MAX_STORED_HIT]
int superLayer_[N_MAX_STORED_HIT]
ResidualRefitting::storage_hit storageRecMuon_
void StoreTrackerRecHits(DetId detid, const TrackerTopology *tTopo, int iTrack, int iRec)
static constexpr int DT
Definition: MuonSubdetId.h:12
static constexpr int CSC
Definition: MuonSubdetId.h:13
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]
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39
void ResidualRefitting::cylExtrapTrkSam ( int  recNum,
reco::TrackRef  track,
ResidualRefitting::storage_trackExtrap storage,
double  rho 
)

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

815  {
816 
819 
820  Cylinder::CylinderPointer myCylinder = Cylinder::build(pos, rot, rho);
821 // SteppingHelixPropagator inwardProp ( theField, oppositeToMomentum );
822 // SteppingHelixPropagator outwardProp ( theField, alongMomentum );
823  FreeTrajectoryState recoStart = freeTrajStateMuon(track);
824 // TrajectoryStateOnSurface recoProp = outwardProp.propagate(recoStart, *myCylinder);
825  TrajectoryStateOnSurface recoProp = thePropagator->propagate(recoStart, *myCylinder);
826 
827  double xVal = -9999;
828  double yVal = -9999;
829  double zVal = -9999;
830  double phiVal = -9999;
831  double etaVal = -9999;
832 
833  if(recoProp.isValid()) {
834  GlobalPoint recoPoint = recoProp.globalPosition();
835  xVal = recoPoint.x();
836  yVal = recoPoint.y();
837  zVal = recoPoint.z();
838  phiVal = recoPoint.phi();
839  etaVal = recoPoint.eta();
840  }
841  storage.muonLink_[recNum] = recNum;
842  storage.gpX_ [recNum] = xVal;
843  storage.gpY_ [recNum] = yVal;
844  storage.gpZ_ [recNum] = zVal;
845  storage.gpEta_ [recNum] = etaVal;
846  storage.gpPhi_ [recNum] = phiVal;
847 
848  float rhoVal = sqrt( xVal*xVal + yVal*yVal);
849 
850  printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
851  if (debug_) printf("Cylinder: rho = %4.2f\tphi = %4.2f\teta = %4.2f\n", rhoVal, phiVal, etaVal);
852 
853 
854 }
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 1258 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_.

1258  {
1259  std::cout<<"Muon Rec Hits Dump:\n";
1260  for (unsigned int i = 0; i < (unsigned int)hit.n_; i++) {
1261 
1262 // double rho = sqrt( (float)hit.gpX_[i] * (float)hit.gpX_[i] + (float)hit.gpY_[i] * (float)hit.gpY_[i] );
1263 
1264  printf ("%d\tsubdetector = %d\t superLayer =%d" , i, (int)hit.system_[i], (int)hit.superLayer_[i] );
1265 // printf ("\tGlobal\tx = %0.3f" , (float)hit.gpX_[i] );
1266 // printf ("\ty = %0.3f" , (float)hit.gpY_[i] );
1267 // printf ("\tz = %0.3f" , (float)hit.gpZ_[i] );
1268 // printf ("\trho =%0.3f" , rho );
1269 // printf ("\teta = %0.3f" , (float)hit.gpEta_[i] );
1270 // printf ("\tphi = %0.3f\n" , (float)hit.gpPhi_[i] );
1271  printf ("\t\tLocal\tx = %0.3f" , (float)hit.lpX_[i] );
1272  printf ("\ty = %0.3f" , (float)hit.lpY_[i] );
1273  printf ("\tz = %0.3f\n" , (float)hit.lpZ_[i] );
1274 
1275  }
1276 
1277 }
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 1234 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_.

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

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

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

Definition at line 1305 of file ResidualRefitting.cc.

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

Referenced by analyze(), and CollectTrackHits().

1305  {
1306 
1307  float pt = muon->pt();
1308  float p = muon->p ();
1309  float eta = muon->eta();
1310  float phi = muon->phi();
1311  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);
1312 
1313 }
#define str(s)
void ResidualRefitting::endJob ( void  )
overridevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1198 of file ResidualRefitting.cc.

References outputFile_.

Referenced by o2olib.O2ORunMgr::executeJob().

1198  {
1199 
1200 
1201  outputFile_ -> Write();
1202 
1203  outputFile_ -> Close() ;
1204 
1205 }
FreeTrajectoryState ResidualRefitting::freeTrajStateMuon ( reco::TrackRef  muon)

Definition at line 1209 of file ResidualRefitting.cc.

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

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

1209  {
1210 
1211  math::XYZPoint innerPos = muon -> referencePoint();
1212  math::XYZVector innerMom = muon -> momentum();
1213  if (debug_) std::cout << "Inner Pos: "
1214  << "\tx = " << innerPos.X()
1215  << "\ty = " << innerPos.Y()
1216  << "\tz = " << innerPos.Z()
1217  << std::endl;
1218 
1219  GlobalPoint innerPoint( innerPos.X(), innerPos.Y(), innerPos.Z());
1220  GlobalVector innerVec ( innerMom.X(), innerMom.Y(), innerMom.Z());
1221 
1222  FreeTrajectoryState recoStart( innerPoint, innerVec, muon ->charge(), theField );
1223  return recoStart;
1224 
1225 }
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 const &  hit1,
TrackingRecHit const &  hit2 
)

Definition at line 543 of file ResidualRefitting.cc.

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

Referenced by MatchTrackWithRecHits(), and NewTrackMeasurements().

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

Definition at line 475 of file ResidualRefitting.cc.

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

Referenced by NewTrackMeasurements().

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

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

671  {
672 
673 
674  storeMuon.pt_ [val] = muon->pt();
675  storeMuon.p_ [val] = muon->p();
676  storeMuon.eta_[val] = muon->eta();
677  storeMuon.phi_[val] = muon->phi();
678  storeMuon.charge_[val] = muon->charge();
679  storeMuon.numRecHits_[val] = muon->numberOfValidHits();
680  storeMuon.chiSq_[val] = muon->chi2();
681  storeMuon.ndf_[val] = muon->ndof();
682  storeMuon.chiSqOvrNdf_[val] = muon->normalizedChi2();
683 
684 }
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(auto const& rec1 : ref->recHits()) {
445 
446  bool unbiasedRec = true;
447 
448  for(auto const& rec2 : muon->recHits()) {
449 
450  if (IsSameHit(*rec1,*rec2)) {
451  unbiasedRec = false;
452  break;
453  }
454  }
455  if (!unbiasedRec) continue;
456 
457  DetId detid = rec1->geographicalId();
458 
460  theService->trackingGeometry()->idToDet(rec1->geographicalId()), rec1);
461 
462  trkExtrap(detid, numTracks, iTrackLink, recCounter, recoStart, rec1->localPosition(), trackExtrap);
463  numTracks++;
464 
465  }
466 
467  }
468 
469  trackExtrap.n_ = numTracks;
470 
471 }
bool IsSameHit(TrackingRecHit const &hit1, TrackingRecHit const &hit2)
void trkExtrap(const DetId &detid, int iTrkLink, int iTrk, int iRec, const FreeTrajectoryState &freeTrajState, const LocalPoint &recPoint, storage_trackExtrap &storeTemp)
int MatchTrackWithRecHits(reco::TrackCollection::const_iterator trackIt, edm::Handle< reco::TrackCollection > ref)
MuonServiceProxy * theService
FreeTrajectoryState freeTrajStateMuon(reco::TrackRef muon)
Definition: DetId.h:18
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:21
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 794 of file ResidualRefitting.cc.

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

Referenced by trkExtrap().

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

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

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

Definition at line 567 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_, 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().

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

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

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

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

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

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

862  {
863  if (debug_) printf("zero_storage\n");
864 
877 //zero out the tracker
881 
883 
888 
890 
897 
899 
903 
905 
910 
912 
919 
921 
928 
930 
932 
936 
938 
943 
950 
952 
954 
955  storageRecMuon_ .n_ = 0;
956  storageTrackHit_ .n_ = 0;
957 
958 }
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 982 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().

982  {
983 
984  str->n_ = 0;
985  for (int i = 0; i < ResidualRefitting::N_MAX_STORED_HIT; i++) {
986 
987  str->muonLink_ [i] = -9999;
988  str->recLink_ [i] = -9999;
989  str->gpX_ [i] = -9999;
990  str->gpY_ [i] = -9999;
991  str->gpZ_ [i] = -9999;
992  str->gpEta_ [i] = -9999;
993  str->gpPhi_ [i] = -9999;
994  str->lpX_ [i] = -9999;
995  str->lpY_ [i] = -9999;
996  str->lpZ_ [i] = -9999;
997  str->resX_ [i] = -9999;
998  str->resY_ [i] = -9999;
999  str->resZ_ [i] = -9999;
1000  }
1001 
1002 }
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.