Skip to content

Commit

Permalink
Merge pull request #10893 from cschomak/CMSSW_7_4_6_patch5_APETool
Browse files Browse the repository at this point in the history
APE tool implemented, PR #10601and PR#12783 backported
  • Loading branch information
cmsbuild committed Jan 5, 2016
2 parents 77e760a + 5c1998e commit 8f2513c
Show file tree
Hide file tree
Showing 79 changed files with 14,027 additions and 4 deletions.
40 changes: 40 additions & 0 deletions Alignment/APEEstimation/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<use name="FWCore/Framework"/>
<use name="FWCore/MessageLogger"/>
<use name="FWCore/ParameterSet"/>
<use name="FWCore/ServiceRegistry"/>
<use name="FWCore/Utilities"/>
<use name="CommonTools/UtilAlgos"/>
<use name="CommonTools/Utils"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/CLHEP"/>
<use name="DataFormats/TrackReco"/>
<use name="DataFormats/TrackingRecHit"/>
<use name="DataFormats/DetId"/>
<use name="DataFormats/TrackerRecHit2D"/>
<use name="DataFormats/GeometryVector"/>
<use name="DataFormats/GeometryCommonDetAlgo"/>
<use name="DataFormats/SiPixelDetId"/>
<use name="DataFormats/SiStripDetId"/>
<use name="DataFormats/SiPixelCluster"/>
<use name="DataFormats/SiStripCluster"/>
<use name="TrackingTools/PatternTools"/>
<use name="TrackingTools/TrackFitters"/>
<use name="TrackingTools/TransientTrackingRecHit"/>
<use name="TrackingTools/TrajectoryState"/>
<use name="Geometry/CommonDetUnit"/>
<use name="Geometry/CommonTopologies"/>
<use name="Geometry/TrackerGeometryBuilder"/>
<use name="CondFormats/Alignment"/>
<use name="RecoLocalTracker/SiStripClusterizer"/>
<use name="RecoLocalTracker/SiStripRecHitConverter"/>
<use name="MagneticField/Engine"/>
<use name="CondFormats/SiStripObjects"/>
<use name="DataFormats/GeometrySurface"/>
<use name="MagneticField/Records"/>
<use name="CondFormats/DataRecord"/>
<use name="DataFormats/BeamSpot"/>
<use name="DataFormats/Math"/>
<use name="rootcore"/>
<use name="root"/>
<export>
</export>
112 changes: 112 additions & 0 deletions Alignment/APEEstimation/interface/EventVariables.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#ifndef Alignment_APEEstimation_EventVariables_h
#define Alignment_APEEstimation_EventVariables_h


struct TrackStruct{

TrackStruct(){}

enum HitState{notInTracker, notAssignedToSectors, invalid, negativeError, ok};

struct HitParameterStruct{

HitParameterStruct(): hitState(ok),
isPixelHit(false),
goodXMeasurement(false),
goodYMeasurement(false),
widthX(0),
baryStripX(-999.F),
widthY(0),
baryStripY(-999.F),
chargePixel(-999.F),
clusterProbabilityXY(-999.F), clusterProbabilityQ(-999.F),
clusterProbabilityXYQ(-999.F), logClusterProbability(-999.F),
isOnEdge(false), hasBadPixels(false), spansTwoRoc(false),
qBin(-1),
isModuleUsable(true),
chargeStrip(0),
maxStrip(0), maxStripInv(0), maxCharge(0), maxIndex(0),
chargeOnEdges(-999.F), chargeAsymmetry(-999.F),
chargeLRplus(-999.F), chargeLRminus(-999.F),
sOverN(-999.F),
projWidth(-999.F),
resX(-999.F), norResX(-999.F), xHit(-999.F), xTrk(-999.F),
errXHit(-999.F), errXTrk(-999.F), errX(-999.F), errX2(-999.F),
errXHitWoApe(-999.F), errXWoApe(-999.F),
probX(-999.F),
resY(-999.F), norResY(-999.F), yHit(-999.F), yTrk(-999.F),
errYHit(-999.F), errYTrk(-999.F), errY(-999.F), errY2(-999.F),
errYHitWoApe(-999.F), errYWoApe(-999.F),
probY(-999.F),
phiSens(-999.F), phiSensX(-999.F), phiSensY(-999.F){}

HitState hitState;
bool isPixelHit;
bool goodXMeasurement, goodYMeasurement;
std::vector<unsigned int> v_sector;

// Cluster parameters
// pixel+strip
unsigned int widthX;
float baryStripX;
// pixel only
unsigned int widthY;
float baryStripY;
float chargePixel;
float clusterProbabilityXY, clusterProbabilityQ,
clusterProbabilityXYQ, logClusterProbability;
bool isOnEdge, hasBadPixels, spansTwoRoc;
int qBin;
// strip only
bool isModuleUsable;
unsigned int chargeStrip;
unsigned int maxStrip, maxStripInv, maxCharge, maxIndex;
float chargeOnEdges, chargeAsymmetry,
chargeLRplus, chargeLRminus;
float sOverN;
float projWidth;

// trackFit results
float resX, norResX, xHit, xTrk,
errXHit, errXTrk, errX, errX2,
errXHitWoApe, errXWoApe,
probX;
float resY, norResY, yHit, yTrk,
errYHit, errYTrk, errY, errY2,
errYHitWoApe, errYWoApe,
probY;
float phiSens, phiSensX, phiSensY;
};

struct TrackParameterStruct{

TrackParameterStruct(): hitsSize(-999), hitsValid(-999), hitsInvalid(-999),
hits2D(-999), layersMissed(-999),
hitsPixel(-999), hitsStrip(-999),
charge(-999),
chi2(-999.F), ndof(-999.F), norChi2(-999.F), prob(-999.F),
eta(-999.F), etaErr(-999.F), theta(-999.F),
phi(-999.F), phiErr(-999.F),
d0(-999.F), d0Beamspot(-999.F), d0BeamspotErr(-999.F),
dz(-999.F), dzErr(-999.F), dzBeamspot(-999.F),
p(-999.F), pt(-999.F), ptErr(-999.F),
meanPhiSensToNorm(-999.F){}

int hitsSize, hitsValid, hitsInvalid,
hits2D, layersMissed,
hitsPixel, hitsStrip,
charge;
float chi2, ndof, norChi2, prob,
eta, etaErr, theta,
phi, phiErr,
d0, d0Beamspot, d0BeamspotErr,
dz, dzErr, dzBeamspot,
p, pt, ptErr,
meanPhiSensToNorm;
};

TrackParameterStruct trkParams;
std::vector<HitParameterStruct> v_hitParams;
};

#endif
28 changes: 28 additions & 0 deletions Alignment/APEEstimation/interface/ReducedTrackerTreeVariables.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#ifndef ReducedTrackerTreeVariables_h
#define ReducedTrackerTreeVariables_h


// For ROOT types with '_t':
#include <Rtypes.h>



// container to hold those static module parameters needed for correct xPrime-Residual calculation (and others), determined with ideal geometry
struct ReducedTrackerTreeVariables{

ReducedTrackerTreeVariables(){this->clear();}

void clear(){
subdetId = 0;
nStrips = 0;
uDirection = vDirection = wDirection = 0;
}

UInt_t subdetId,
nStrips;
Int_t uDirection, vDirection, wDirection;
};



#endif
55 changes: 55 additions & 0 deletions Alignment/APEEstimation/interface/TrackerDetectorStruct.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#ifndef Alignment_APEEstimation_TrackerDetectorStruct_h
#define Alignment_APEEstimation_TrackerDetectorStruct_h


//#include "TH1.h"

struct TrackerDetectorStruct{

TrackerDetectorStruct(): TrkSize(0), TrkSizeGood(0),
HitsSize(0), HitsValid(0), HitsInvalid(0), Hits2D(0),
HitsGood(0), LayersMissed(0),
HitsPixel(0), HitsStrip(0),
Charge(0),
Chi2(0), Ndof(0), NorChi2(0), Prob(0),
Eta(0), EtaErr(0), EtaSig(0), Theta(0),
Phi(0), PhiErr(0), PhiSig(0),
D0Beamspot(0), D0BeamspotErr(0), D0BeamspotSig(0),
Dz(0), DzErr(0), DzSig(0),
P(0), Pt(0), PtErr(0), PtSig(0),
MeanAngle(0),
HitsGoodVsHitsValid(0), MeanAngleVsHits(0),
HitsPixelVsEta(0), HitsPixelVsTheta(0),
HitsStripVsEta(0), HitsStripVsTheta(0),
PtVsEta(0), PtVsTheta(0),
PHitsGoodVsHitsValid(0), PMeanAngleVsHits(0),
PHitsPixelVsEta(0), PHitsPixelVsTheta(0),
PHitsStripVsEta(0), PHitsStripVsTheta(0),
PPtVsEta(0), PPtVsTheta(0){}

TH1 *TrkSize, *TrkSizeGood,
*HitsSize, *HitsValid, *HitsInvalid, *Hits2D,
*HitsGood, *LayersMissed,
*HitsPixel, *HitsStrip,
*Charge,
*Chi2, *Ndof, *NorChi2, *Prob,
*Eta, *EtaErr, *EtaSig, *Theta,
*Phi,*PhiErr, *PhiSig,
*D0Beamspot, *D0BeamspotErr, *D0BeamspotSig,
*Dz, *DzErr, *DzSig,
*P, *Pt, *PtErr, *PtSig,
*MeanAngle;

TH2 *HitsGoodVsHitsValid, *MeanAngleVsHits,
*HitsPixelVsEta, *HitsPixelVsTheta,
*HitsStripVsEta, *HitsStripVsTheta,
*PtVsEta, *PtVsTheta;

TProfile *PHitsGoodVsHitsValid, *PMeanAngleVsHits,
*PHitsPixelVsEta, *PHitsPixelVsTheta,
*PHitsStripVsEta, *PHitsStripVsTheta,
*PPtVsEta, *PPtVsTheta;

};

#endif
Loading

0 comments on commit 8f2513c

Please sign in to comment.