Definition at line 33 of file AlignmentMonitorMuonPositions.cc.
AlignmentMonitorMuonPositions::AlignmentMonitorMuonPositions | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 85 of file AlignmentMonitorMuonPositions.cc.
00086 : AlignmentMonitorBase(cfg, "AlignmentMonitorMuonPositions") 00087 { 00088 }
AlignmentMonitorMuonPositions::~AlignmentMonitorMuonPositions | ( | ) | [inline] |
void AlignmentMonitorMuonPositions::afterAlignment | ( | const edm::EventSetup & | iSetup | ) | [virtual] |
Called after updating AlignableTracker and AlignableMuon (by "endOfLoop()"): may be reimplemented.
Reimplemented from AlignmentMonitorBase.
Definition at line 194 of file AlignmentMonitorMuonPositions.cc.
References fill().
00194 { 00195 fill(); 00196 }
void AlignmentMonitorMuonPositions::book | ( | ) | [virtual] |
Book or retrieve histograms; MUST be reimplemented.
Implements AlignmentMonitorBase.
Definition at line 98 of file AlignmentMonitorMuonPositions.cc.
References AlignmentMonitorBase::directory(), fill(), AlignmentMonitorBase::iteration(), m_cscchamber_id, m_cscchamber_phix, m_cscchamber_phiy, m_cscchamber_phiz, m_cscchamber_rawid, m_cscchamber_ring, m_cscchamber_x, m_cscchamber_y, m_cscchamber_z, m_cscchambers, m_dtchamber_id, m_dtchamber_phix, m_dtchamber_phiy, m_dtchamber_phiz, m_dtchamber_rawid, m_dtchamber_wheel, m_dtchamber_x, m_dtchamber_y, m_dtchamber_z, m_dtchambers, m_ring_id, m_ring_phix, m_ring_phiy, m_ring_phiz, m_ring_x, m_ring_y, m_ring_z, m_rings, m_wheel_id, m_wheel_phix, m_wheel_phiy, m_wheel_phiz, m_wheel_x, m_wheel_y, m_wheel_z, m_wheels, and TFileDirectory::make().
00098 { 00099 if (iteration() == 1) { 00100 m_wheels = directory("/start/")->make<TTree>("wheels", "wheel positions after iteration"); 00101 m_wheels->Branch("id", &m_wheel_id, "id/I"); 00102 m_wheels->Branch("x", &m_wheel_x, "x/F"); 00103 m_wheels->Branch("y", &m_wheel_y, "y/F"); 00104 m_wheels->Branch("z", &m_wheel_z, "z/F"); 00105 m_wheels->Branch("phix", &m_wheel_phix, "phix/F"); 00106 m_wheels->Branch("phiy", &m_wheel_phiy, "phiy/F"); 00107 m_wheels->Branch("phiz", &m_wheel_phiz, "phiz/F"); 00108 00109 m_dtchambers = directory("/start/")->make<TTree>("dtchambers", "dtchamber positions after iteration"); 00110 m_dtchambers->Branch("id", &m_dtchamber_id, "id/I"); 00111 m_dtchambers->Branch("rawid", &m_dtchamber_rawid, "rawid/I"); 00112 m_dtchambers->Branch("wheel", &m_dtchamber_wheel, "wheel/I"); 00113 m_dtchambers->Branch("x", &m_dtchamber_x, "x/F"); 00114 m_dtchambers->Branch("y", &m_dtchamber_y, "y/F"); 00115 m_dtchambers->Branch("z", &m_dtchamber_z, "z/F"); 00116 m_dtchambers->Branch("phix", &m_dtchamber_phix, "phix/F"); 00117 m_dtchambers->Branch("phiy", &m_dtchamber_phiy, "phiy/F"); 00118 m_dtchambers->Branch("phiz", &m_dtchamber_phiz, "phiz/F"); 00119 00120 m_rings = directory("/start/")->make<TTree>("rings", "ring positions after iteration"); 00121 m_rings->Branch("id", &m_ring_id, "id/I"); 00122 m_rings->Branch("x", &m_ring_x, "x/F"); 00123 m_rings->Branch("y", &m_ring_y, "y/F"); 00124 m_rings->Branch("z", &m_ring_z, "z/F"); 00125 m_rings->Branch("phix", &m_ring_phix, "phix/F"); 00126 m_rings->Branch("phiy", &m_ring_phiy, "phiy/F"); 00127 m_rings->Branch("phiz", &m_ring_phiz, "phiz/F"); 00128 00129 m_cscchambers = directory("/start/")->make<TTree>("cscchambers", "cscchamber positions after iteration"); 00130 m_cscchambers->Branch("id", &m_cscchamber_id, "id/I"); 00131 m_cscchambers->Branch("rawid", &m_cscchamber_rawid, "rawid/I"); 00132 m_cscchambers->Branch("ring", &m_cscchamber_ring, "ring/I"); 00133 m_cscchambers->Branch("x", &m_cscchamber_x, "x/F"); 00134 m_cscchambers->Branch("y", &m_cscchamber_y, "y/F"); 00135 m_cscchambers->Branch("z", &m_cscchamber_z, "z/F"); 00136 m_cscchambers->Branch("phix", &m_cscchamber_phix, "phix/F"); 00137 m_cscchambers->Branch("phiy", &m_cscchamber_phiy, "phiy/F"); 00138 m_cscchambers->Branch("phiz", &m_cscchamber_phiz, "phiz/F"); 00139 00140 fill(); 00141 } 00142 00143 m_wheels = directory("/iterN/")->make<TTree>("wheels", "wheel positions after iteration"); 00144 m_wheels->Branch("id", &m_wheel_id, "id/I"); 00145 m_wheels->Branch("x", &m_wheel_x, "x/F"); 00146 m_wheels->Branch("y", &m_wheel_y, "y/F"); 00147 m_wheels->Branch("z", &m_wheel_z, "z/F"); 00148 m_wheels->Branch("phix", &m_wheel_phix, "phix/F"); 00149 m_wheels->Branch("phiy", &m_wheel_phiy, "phiy/F"); 00150 m_wheels->Branch("phiz", &m_wheel_phiz, "phiz/F"); 00151 00152 m_dtchambers = directory("/iterN/")->make<TTree>("dtchambers", "dtchamber positions after iteration"); 00153 m_dtchambers->Branch("id", &m_dtchamber_id, "id/I"); 00154 m_dtchambers->Branch("rawid", &m_dtchamber_rawid, "rawid/I"); 00155 m_dtchambers->Branch("wheel", &m_dtchamber_wheel, "wheel/I"); 00156 m_dtchambers->Branch("x", &m_dtchamber_x, "x/F"); 00157 m_dtchambers->Branch("y", &m_dtchamber_y, "y/F"); 00158 m_dtchambers->Branch("z", &m_dtchamber_z, "z/F"); 00159 m_dtchambers->Branch("phix", &m_dtchamber_phix, "phix/F"); 00160 m_dtchambers->Branch("phiy", &m_dtchamber_phiy, "phiy/F"); 00161 m_dtchambers->Branch("phiz", &m_dtchamber_phiz, "phiz/F"); 00162 00163 m_rings = directory("/iterN/")->make<TTree>("rings", "ring positions after iteration"); 00164 m_rings->Branch("id", &m_ring_id, "id/I"); 00165 m_rings->Branch("x", &m_ring_x, "x/F"); 00166 m_rings->Branch("y", &m_ring_y, "y/F"); 00167 m_rings->Branch("z", &m_ring_z, "z/F"); 00168 m_rings->Branch("phix", &m_ring_phix, "phix/F"); 00169 m_rings->Branch("phiy", &m_ring_phiy, "phiy/F"); 00170 m_rings->Branch("phiz", &m_ring_phiz, "phiz/F"); 00171 00172 m_cscchambers = directory("/iterN/")->make<TTree>("cscchambers", "cscchamber positions after iteration"); 00173 m_cscchambers->Branch("id", &m_cscchamber_id, "id/I"); 00174 m_cscchambers->Branch("rawid", &m_cscchamber_rawid, "rawid/I"); 00175 m_cscchambers->Branch("ring", &m_cscchamber_ring, "ring/I"); 00176 m_cscchambers->Branch("x", &m_cscchamber_x, "x/F"); 00177 m_cscchambers->Branch("y", &m_cscchamber_y, "y/F"); 00178 m_cscchambers->Branch("z", &m_cscchamber_z, "z/F"); 00179 m_cscchambers->Branch("phix", &m_cscchamber_phix, "phix/F"); 00180 m_cscchambers->Branch("phiy", &m_cscchamber_phiy, "phiy/F"); 00181 m_cscchambers->Branch("phiz", &m_cscchamber_phiz, "phiz/F"); 00182 }
void AlignmentMonitorMuonPositions::event | ( | const edm::EventSetup & | iSetup, | |
const ConstTrajTrackPairCollection & | iTrajTracks | |||
) |
void AlignmentMonitorMuonPositions::fill | ( | ) | [private] |
Definition at line 198 of file AlignmentMonitorMuonPositions.cc.
References funct::abs(), AlignableMuon::CSCChambers(), AlignableMuon::CSCRings(), AlignableMuon::DTChambers(), AlignableMuon::DTWheels(), CSCDetId::endcap(), iter, m_cscchamber_id, m_cscchamber_phix, m_cscchamber_phiy, m_cscchamber_phiz, m_cscchamber_rawid, m_cscchamber_ring, m_cscchamber_x, m_cscchamber_y, m_cscchamber_z, m_cscchambers, m_dtchamber_id, m_dtchamber_phix, m_dtchamber_phiy, m_dtchamber_phiz, m_dtchamber_rawid, m_dtchamber_wheel, m_dtchamber_x, m_dtchamber_y, m_dtchamber_z, m_dtchambers, m_ring_id, m_ring_phix, m_ring_phiy, m_ring_phiz, m_ring_x, m_ring_y, m_ring_z, m_rings, m_wheel_id, m_wheel_phix, m_wheel_phiy, m_wheel_phiz, m_wheel_x, m_wheel_y, m_wheel_z, m_wheels, AlignmentMonitorBase::pMuon(), CSCDetId::ring(), RingMakerESProducer_cfi::rings, funct::sqrt(), CSCDetId::station(), DTChamberId::wheel(), PV3DBase< T, PVType, FrameType >::x(), TkRotation< T >::xx(), PV3DBase< T, PVType, FrameType >::y(), TkRotation< T >::yx(), PV3DBase< T, PVType, FrameType >::z(), TkRotation< T >::zx(), TkRotation< T >::zy(), and TkRotation< T >::zz().
Referenced by afterAlignment(), and book().
00198 { 00199 const std::vector<Alignable*> wheels = pMuon()->DTWheels(); 00200 const std::vector<Alignable*> dtchambers = pMuon()->DTChambers(); 00201 const std::vector<Alignable*> rings = pMuon()->CSCRings(); 00202 const std::vector<Alignable*> cscchambers = pMuon()->CSCChambers(); 00203 00204 for (std::vector<Alignable*>::const_iterator iter = wheels.begin(); iter != wheels.end(); ++iter) { 00205 LocalVector displacement = (*iter)->surface().toLocal((*iter)->displacement()); 00206 align::RotationType rotation = (*iter)->surface().toLocal((*iter)->rotation()); 00207 double mxx = rotation.xx(); 00208 double myx = rotation.yx(); 00209 double mzx = rotation.zx(); 00210 double mzy = rotation.zy(); 00211 double mzz = rotation.zz(); 00212 double denom = sqrt(1. - mzx*mzx); 00213 00214 std::vector<Alignable*> components = (*iter)->components(); 00215 while (components[0]->geomDetId().rawId() == 0) { 00216 components = components[0]->components(); 00217 } 00218 00219 DTChamberId dtChamberId(components[0]->geomDetId().rawId()); 00220 m_wheel_id = dtChamberId.wheel(); 00221 m_wheel_x = displacement.x(); 00222 m_wheel_y = displacement.y(); 00223 m_wheel_z = displacement.z(); 00224 m_wheel_phix = atan2(-mzy/denom, mzz/denom); 00225 m_wheel_phiy = atan2(mzx, denom); 00226 m_wheel_phiz = atan2(-myx/denom, mxx/denom); 00227 m_wheels->Fill(); 00228 } 00229 00230 for (std::vector<Alignable*>::const_iterator iter = dtchambers.begin(); iter != dtchambers.end(); ++iter) { 00231 LocalVector displacement = (*iter)->surface().toLocal((*iter)->displacement()); 00232 align::RotationType rotation = (*iter)->surface().toLocal((*iter)->rotation()); 00233 double mxx = rotation.xx(); 00234 double myx = rotation.yx(); 00235 double mzx = rotation.zx(); 00236 double mzy = rotation.zy(); 00237 double mzz = rotation.zz(); 00238 double denom = sqrt(1. - mzx*mzx); 00239 00240 DTChamberId dtChamberId((*iter)->geomDetId().rawId()); 00241 m_dtchamber_id = dtChamberId.station() * 100 + dtChamberId.sector(); 00242 m_dtchamber_rawid = (*iter)->geomDetId().rawId(); 00243 m_dtchamber_wheel = dtChamberId.wheel(); 00244 m_dtchamber_x = displacement.x(); 00245 m_dtchamber_y = displacement.y(); 00246 m_dtchamber_z = displacement.z(); 00247 m_dtchamber_phix = atan2(-mzy/denom, mzz/denom); 00248 m_dtchamber_phiy = atan2(mzx, denom); 00249 m_dtchamber_phiz = atan2(-myx/denom, mxx/denom); 00250 m_dtchambers->Fill(); 00251 } 00252 00253 for (std::vector<Alignable*>::const_iterator iter = rings.begin(); iter != rings.end(); ++iter) { 00254 LocalVector displacement = (*iter)->surface().toLocal((*iter)->displacement()); 00255 align::RotationType rotation = (*iter)->surface().toLocal((*iter)->rotation()); 00256 double mxx = rotation.xx(); 00257 double myx = rotation.yx(); 00258 double mzx = rotation.zx(); 00259 double mzy = rotation.zy(); 00260 double mzz = rotation.zz(); 00261 double denom = sqrt(1. - mzx*mzx); 00262 00263 std::vector<Alignable*> components = (*iter)->components(); 00264 while (components[0]->geomDetId().rawId() == 0) { 00265 components = components[0]->components(); 00266 } 00267 00268 CSCDetId cscDetId(components[0]->geomDetId().rawId()); 00269 m_ring_id = (cscDetId.endcap() == 1 ? 1 : -1) * (abs(cscDetId.station()) * 10 + cscDetId.ring()); 00270 m_ring_x = displacement.x(); 00271 m_ring_y = displacement.y(); 00272 m_ring_z = displacement.z(); 00273 m_ring_phix = atan2(-mzy/denom, mzz/denom); 00274 m_ring_phiy = atan2(mzx, denom); 00275 m_ring_phiz = atan2(-myx/denom, mxx/denom); 00276 m_rings->Fill(); 00277 } 00278 00279 for (std::vector<Alignable*>::const_iterator iter = cscchambers.begin(); iter != cscchambers.end(); ++iter) { 00280 LocalVector displacement = (*iter)->surface().toLocal((*iter)->displacement()); 00281 align::RotationType rotation = (*iter)->surface().toLocal((*iter)->rotation()); 00282 double mxx = rotation.xx(); 00283 double myx = rotation.yx(); 00284 double mzx = rotation.zx(); 00285 double mzy = rotation.zy(); 00286 double mzz = rotation.zz(); 00287 double denom = sqrt(1. - mzx*mzx); 00288 00289 CSCDetId cscDetId((*iter)->geomDetId().rawId()); 00290 m_cscchamber_id = cscDetId.chamber(); 00291 m_cscchamber_rawid = cscDetId.rawId(); 00292 m_cscchamber_ring = (cscDetId.endcap() == 1 ? 1 : -1) * (abs(cscDetId.station()) * 10 + cscDetId.ring()); 00293 m_cscchamber_x = displacement.x(); 00294 m_cscchamber_y = displacement.y(); 00295 m_cscchamber_z = displacement.z(); 00296 m_cscchamber_phix = atan2(-mzy/denom, mzz/denom); 00297 m_cscchamber_phiy = atan2(mzx, denom); 00298 m_cscchamber_phiz = atan2(-myx/denom, mxx/denom); 00299 m_cscchambers->Fill(); 00300 } 00301 }
Int_t AlignmentMonitorMuonPositions::m_cscchamber_id [private] |
Float_t AlignmentMonitorMuonPositions::m_cscchamber_phix [private] |
Float_t AlignmentMonitorMuonPositions::m_cscchamber_phiy [private] |
Float_t AlignmentMonitorMuonPositions::m_cscchamber_phiz [private] |
Int_t AlignmentMonitorMuonPositions::m_cscchamber_rawid [private] |
Int_t AlignmentMonitorMuonPositions::m_cscchamber_ring [private] |
Float_t AlignmentMonitorMuonPositions::m_cscchamber_x [private] |
Float_t AlignmentMonitorMuonPositions::m_cscchamber_y [private] |
Float_t AlignmentMonitorMuonPositions::m_cscchamber_z [private] |
TTree * AlignmentMonitorMuonPositions::m_cscchambers [private] |
Int_t AlignmentMonitorMuonPositions::m_dtchamber_id [private] |
Float_t AlignmentMonitorMuonPositions::m_dtchamber_phix [private] |
Float_t AlignmentMonitorMuonPositions::m_dtchamber_phiy [private] |
Float_t AlignmentMonitorMuonPositions::m_dtchamber_phiz [private] |
Int_t AlignmentMonitorMuonPositions::m_dtchamber_rawid [private] |
Int_t AlignmentMonitorMuonPositions::m_dtchamber_wheel [private] |
Float_t AlignmentMonitorMuonPositions::m_dtchamber_x [private] |
Float_t AlignmentMonitorMuonPositions::m_dtchamber_y [private] |
Float_t AlignmentMonitorMuonPositions::m_dtchamber_z [private] |
TTree * AlignmentMonitorMuonPositions::m_dtchambers [private] |
Int_t AlignmentMonitorMuonPositions::m_ring_id [private] |
Float_t AlignmentMonitorMuonPositions::m_ring_phix [private] |
Float_t AlignmentMonitorMuonPositions::m_ring_phiy [private] |
Float_t AlignmentMonitorMuonPositions::m_ring_phiz [private] |
Float_t AlignmentMonitorMuonPositions::m_ring_x [private] |
Float_t AlignmentMonitorMuonPositions::m_ring_y [private] |
Float_t AlignmentMonitorMuonPositions::m_ring_z [private] |
TTree * AlignmentMonitorMuonPositions::m_rings [private] |
Int_t AlignmentMonitorMuonPositions::m_wheel_id [private] |
Float_t AlignmentMonitorMuonPositions::m_wheel_phix [private] |
Float_t AlignmentMonitorMuonPositions::m_wheel_phiy [private] |
Float_t AlignmentMonitorMuonPositions::m_wheel_phiz [private] |
Float_t AlignmentMonitorMuonPositions::m_wheel_x [private] |
Float_t AlignmentMonitorMuonPositions::m_wheel_y [private] |
Float_t AlignmentMonitorMuonPositions::m_wheel_z [private] |
TTree* AlignmentMonitorMuonPositions::m_wheels [private] |