Skip to content

Commit

Permalink
extrapolation of the Seed Tsos to the inner surface, take the Estimat…
Browse files Browse the repository at this point in the history
…or and the propagator from the event setup

---
yaml
---
svn_rev: 11095
current_ref: refs/heads/CMSSW_7_2_X
current_commit: c8c4ce1
head_branch: refs/heads/CMSSW_7_2_X
migrated_from: v3
  • Loading branch information
Riccardo Bellan committed Jul 5, 2006
1 parent 6a03f6f commit 3296963
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 127 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/CMSSW_7_2_X: 764abbbd874100a0f1af780bc986038e3c5f7af9
refs/heads/CMSSW_7_2_X: c8c4ce1babb141cad7c04e96911c5f56b805dd6d
2 changes: 2 additions & 0 deletions trunk/RecoMuon/MuonSeedGenerator/BuildFile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<use name=RecoMuon/DetLayers>
<use name=RecoMuon/MeasurementDet>
<use name=RecoMuon/TransientTrackingRecHit>
<use name=RecoMuon/Navigation>
<use name=CLHEP>
<use name=root>
<use name=gsl>
Expand All @@ -26,6 +27,7 @@
<use name=RecoMuon/TrackingTools>
<use name=RecoMuon/DetLayers>
<use name=RecoMuon/MeasurementDet>
<use name=RecoMuon/Navigation>
<use name=RecoMuon/TransientTrackingRecHit>

<use name=CLHEP>
Expand Down
128 changes: 81 additions & 47 deletions trunk/RecoMuon/MuonSeedGenerator/src/MuonSeedFinder.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* See header file for a description of this class.
*
* $Date: 2006/06/21 17:54:37 $
* $Revision: 1.8 $
* $Date: 2006/06/27 13:42:41 $
* $Revision: 1.9 $
* \author A. Vitelli - INFN Torino, V.Palichik
*
*/
Expand Down Expand Up @@ -148,7 +148,85 @@ vector<TrajectorySeed> MuonSeedFinder::seeds(const edm::EventSetup& eSetup) cons
}

bool
MuonSeedFinder::createEndcapSeed(MuonTransientTrackingRecHit *me,
MuonSeedFinder::createEndcapSeed(MuonTransientTrackingRecHit *last,
vector<TrajectorySeed>& theSeeds,
const edm::EventSetup& eSetup) const {

std::string metname = "Muon|RecoMuon|MuonSeedFinder";

edm::ESHandle<MagneticField> field;
eSetup.get<IdealMagneticFieldRecord>().get(field);

AlgebraicSymMatrix mat(5,0) ;

// this perform H.T() * parErr * H, which is the projection of the
// the measurement error (rechit rf) to the state error (TSOS rf)
// Legenda:
// H => is the 4x5 projection matrix
// parError the 4x4 parameter error matrix of the RecHit

mat = last->parametersError().similarityT( last->projectionMatrix() );

// We want pT but it's not in RecHit interface, so we've put it within this class
float momentum = computePt(last,&*field);
// FIXME
float smomentum = 0.25; // FIXME!!!!

MuonSeedFromRecHits seedCreator;
TrajectorySeed cscSeed = seedCreator.createSeed(momentum,smomentum,last,eSetup);

theSeeds.push_back(cscSeed);

// FIXME
return true;
}


float MuonSeedFinder::computePt(const MuonTransientTrackingRecHit *muon, const MagneticField *field) const {
// assume dZ = dPhi*R*C, here C = pZ/pT
// =======================================================================
// ptc: I suspect the following comment should really be
// dZ/dPsi = 0.5*dz/dPhi
// which I can derive if I assume the particle has travelled in a circle
// projected onto the global xy plane, starting at the origin on the z-axis.
// Here Psi is the angle traced out in the xy plane by the projection of the
// helical path of the charged particle. The axis of the helix is assumed
// parallel to the main B field of the solenoid.
// =======================================================================
// dZ/dPhi = 0.5*dZ/dPsi, here phi = atan2(y,x), psi = rho*s

// ptc: If the local direction is effectively (0,0,1) or (0,0,-1)
// then it's ridiculous to follow this algorithm... just set some
// arbitrary 'high' value and note the sign is undetermined

//@@ DO SOMETHING SANE WITH THESE TRAP VALUES
static float small = 1.e-06;
static float big = 1.e+10;

LocalVector lod = muon->localDirection();
if ( fabs(lod.x())<small && fabs(lod.y())<small ) {
return big;
}

GlobalPoint gp = muon->globalPosition();
GlobalVector gv = muon->globalDirection();
float getx0 = gp.x();
float getay = gv.y()/gv.z();
float gety0 = gp.y();
float getax = gv.x()/gv.z();
float getz0 = gp.z();

float dZdPhi = 0.5f*gp.perp2()/(getx0*getay - gety0*getax);
float dZdT = getz0/gp.perp();
float rho = dZdT/dZdPhi;

// convert to pT (watch the sign !)
GlobalVector fld = field->inInverseGeV( gp );
return -fld.z()/rho;
}

bool
MuonSeedFinder::createEndcapSeed_OLD(MuonTransientTrackingRecHit *me,
vector<TrajectorySeed>& theSeeds,
const edm::EventSetup& eSetup) const {

Expand Down Expand Up @@ -276,47 +354,3 @@ MuonSeedFinder::createEndcapSeed(MuonTransientTrackingRecHit *me,
delete propagator;
return result;
}


float MuonSeedFinder::computePt(const MuonTransientTrackingRecHit *muon, const MagneticField *field) const {
// assume dZ = dPhi*R*C, here C = pZ/pT
// =======================================================================
// ptc: I suspect the following comment should really be
// dZ/dPsi = 0.5*dz/dPhi
// which I can derive if I assume the particle has travelled in a circle
// projected onto the global xy plane, starting at the origin on the z-axis.
// Here Psi is the angle traced out in the xy plane by the projection of the
// helical path of the charged particle. The axis of the helix is assumed
// parallel to the main B field of the solenoid.
// =======================================================================
// dZ/dPhi = 0.5*dZ/dPsi, here phi = atan2(y,x), psi = rho*s

// ptc: If the local direction is effectively (0,0,1) or (0,0,-1)
// then it's ridiculous to follow this algorithm... just set some
// arbitrary 'high' value and note the sign is undetermined

//@@ DO SOMETHING SANE WITH THESE TRAP VALUES
static float small = 1.e-06;
static float big = 1.e+10;

LocalVector lod = muon->localDirection();
if ( fabs(lod.x())<small && fabs(lod.y())<small ) {
return big;
}

GlobalPoint gp = muon->globalPosition();
GlobalVector gv = muon->globalDirection();
float getx0 = gp.x();
float getay = gv.y()/gv.z();
float gety0 = gp.y();
float getax = gv.x()/gv.z();
float getz0 = gp.z();

float dZdPhi = 0.5f*gp.perp2()/(getx0*getay - gety0*getax);
float dZdT = getz0/gp.perp();
float rho = dZdT/dZdPhi;

// convert to pT (watch the sign !)
GlobalVector fld = field->inInverseGeV( gp );
return -fld.z()/rho;
}
10 changes: 7 additions & 3 deletions trunk/RecoMuon/MuonSeedGenerator/src/MuonSeedFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* \author A. Vitelli - INFN Torino
* \author porting R. Bellan - INFN Torino
*
* $Date: 2006/05/30 13:50:23 $
* $Revision: 1.5 $
* $Date: 2006/06/27 13:42:41 $
* $Revision: 1.6 $
*
*/

Expand Down Expand Up @@ -53,9 +53,13 @@ class MuonSeedFinder {
bool createEndcapSeed(MuonTransientTrackingRecHit *me,
std::vector<TrajectorySeed>& theSeeds,
const edm::EventSetup& eSetup) const;

bool createEndcapSeed_OLD(MuonTransientTrackingRecHit *me,
std::vector<TrajectorySeed>& theSeeds,
const edm::EventSetup& eSetup) const;

float computePt(const MuonTransientTrackingRecHit *muon, const MagneticField *field) const;

RecHitContainer theRhits;

// put a parameterSet instead of
Expand Down
Loading

0 comments on commit 3296963

Please sign in to comment.