-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 74457 b: "refs/heads/CMSSW_7_1_X" c: c48430c h: "refs/heads/CMSSW_7_1_X" i: 74455: 2fa1a0a v: v3
- Loading branch information
Burt Betchart
committed
Sep 30, 2009
1 parent
30d5e3f
commit 1321cd9
Showing
35 changed files
with
1,606 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e | ||
"refs/heads/CMSSW_7_1_X": 96fa02802b722c0ee6cf5b1236b4b005289bb1ea | ||
"refs/heads/CMSSW_7_1_X": c48430cf10ee1dbe19616d42776a128e00c42705 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
<use name=FWCore/Framework> | ||
<use name=FWCore/MessageLogger> | ||
<use name=FWCore/PluginManager> | ||
<use name=FWCore/ParameterSet> | ||
<use name=DataFormats/SiStripDetId> | ||
<use name=boost> | ||
<use name=DataFormats/TrackerRecHit2D> | ||
<use name=CondFormats/SiStripObjects> | ||
<export> | ||
<lib name=CalibTrackerSiStripCommon> | ||
<use name=FWCore/Framework> | ||
<use name=FWCore/MessageLogger> | ||
<use name=FWCore/PluginManager> | ||
<use name=FWCore/ParameterSet> | ||
<use name=DataFormats/SiStripDetId> | ||
<use name=boost> | ||
<use name=DataFormats/TrackerRecHit2D> | ||
<use name=CondFormats/SiStripObjects> | ||
</export> |
40 changes: 40 additions & 0 deletions
40
trunk/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef SHALLOW_CLUSTERS_PRODUCER | ||
#define SHALLOW_CLUSTERS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "DataFormats/Common/interface/DetSetVector.h" | ||
class SiStripClusterInfo; | ||
class SiStripProcessedRawDigi; | ||
|
||
class ShallowClustersProducer : public edm::EDProducer { | ||
|
||
public: | ||
|
||
explicit ShallowClustersProducer(const edm::ParameterSet&); | ||
|
||
private: | ||
|
||
edm::InputTag theClustersLabel; | ||
std::string Prefix; | ||
void produce( edm::Event &, const edm::EventSetup & ); | ||
|
||
struct moduleVars { | ||
moduleVars(uint32_t); | ||
int subdetid, side, layerwheel, stringringrod, petal, stereo; | ||
uint32_t module; | ||
}; | ||
|
||
struct NearDigis { | ||
NearDigis(const SiStripClusterInfo&); | ||
NearDigis(const SiStripClusterInfo&, const edm::DetSetVector<SiStripProcessedRawDigi>&); | ||
float max, left, right, first, last, Lleft, Rright; | ||
float etaX() const {return (left+right)/max/2.;} | ||
float eta() const {return right>left ? max/(max+right) : left/(left+max);} | ||
float etaasymm() const {return right>left ? (right-max)/(right+max) : (max-left)/(max+left);} | ||
float outsideasymm() const {return (last-first)/(last+first);} | ||
}; | ||
|
||
}; | ||
|
||
#endif |
39 changes: 39 additions & 0 deletions
39
trunk/CalibTracker/SiStripCommon/interface/ShallowDigisProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#ifndef SHALLOW_DIGIS_PRODUCER | ||
#define SHALLOW_DIGIS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
class SiStripNoises; | ||
|
||
class ShallowDigisProducer : public edm::EDProducer { | ||
|
||
public: | ||
|
||
explicit ShallowDigisProducer(const edm::ParameterSet&); | ||
|
||
private: | ||
struct products { | ||
std::auto_ptr<std::vector<unsigned> > id; | ||
std::auto_ptr<std::vector<unsigned> > subdet; | ||
std::auto_ptr<std::vector<unsigned> > strip; | ||
std::auto_ptr<std::vector<unsigned> > adc; | ||
std::auto_ptr<std::vector<float> > noise; | ||
products() | ||
: id(new std::vector<unsigned>()), | ||
subdet(new std::vector<unsigned>()), | ||
strip(new std::vector<unsigned>()), | ||
adc(new std::vector<unsigned>()), | ||
noise(new std::vector<float>()) {} | ||
}; | ||
std::vector<edm::InputTag> inputTags; | ||
edm::ESHandle<SiStripNoises> noiseHandle; | ||
|
||
void produce(edm::Event&, const edm::EventSetup&); | ||
template<class T> bool findInput(edm::Handle<T>&, const edm::Event&); | ||
template<class T> void recordDigis(const T &, products&); | ||
void insert(products&, edm::Event&); | ||
|
||
}; | ||
|
||
#endif |
14 changes: 14 additions & 0 deletions
14
trunk/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef SHALLOW_EVENTDATA_PRODUCER | ||
#define SHALLOW_EVENTDATA_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
class ShallowEventDataProducer : public edm::EDProducer { | ||
public: | ||
explicit ShallowEventDataProducer(const edm::ParameterSet&); | ||
private: | ||
void produce( edm::Event &, const edm::EventSetup & ); | ||
}; | ||
|
||
#endif |
14 changes: 14 additions & 0 deletions
14
trunk/CalibTracker/SiStripCommon/interface/ShallowExampleProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef SHALLOW_EXAMPLE_PRODUCER | ||
#define SHALLOW_EXAMPLE_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
class ShallowExampleProducer : public edm::EDProducer { | ||
public: | ||
explicit ShallowExampleProducer(const edm::ParameterSet&); | ||
private: | ||
void produce( edm::Event &, const edm::EventSetup & ); | ||
}; | ||
|
||
#endif |
18 changes: 18 additions & 0 deletions
18
trunk/CalibTracker/SiStripCommon/interface/ShallowRechitClustersProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef SHALLOW_RECHITCLUSTERS_PRODUCER | ||
#define SHALLOW_RECHITCLUSTERS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
class ShallowRechitClustersProducer : public edm::EDProducer { | ||
public: | ||
explicit ShallowRechitClustersProducer(const edm::ParameterSet&); | ||
private: | ||
std::string Suffix; | ||
std::string Prefix; | ||
edm::InputTag theClustersLabel; | ||
std::vector<edm::InputTag> inputTags; | ||
void produce( edm::Event &, const edm::EventSetup & ); | ||
}; | ||
|
||
#endif |
23 changes: 23 additions & 0 deletions
23
trunk/CalibTracker/SiStripCommon/interface/ShallowSimTracksProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef SHALLOW_SIMTRACKS_PRODUCER | ||
#define SHALLOW_SIMTRACKS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
class ShallowSimTracksProducer : public edm::EDProducer { | ||
|
||
public: | ||
|
||
explicit ShallowSimTracksProducer(const edm::ParameterSet&); | ||
|
||
private: | ||
|
||
const std::string Prefix; | ||
const std::string Suffix; | ||
const edm::InputTag trackingParticles_tag; | ||
const edm::ESInputTag associator_tag; | ||
const edm::InputTag tracks_tag; | ||
void produce( edm::Event &, const edm::EventSetup & ); | ||
|
||
}; | ||
#endif |
23 changes: 23 additions & 0 deletions
23
trunk/CalibTracker/SiStripCommon/interface/ShallowSimhitClustersProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef SHALLOW_SIMHITCLUSTERS_PRODUCER | ||
#define SHALLOW_SIMHITCLUSTERS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "CalibTracker/SiStripCommon/interface/ShallowTools.h" | ||
class SiStripCluster; | ||
|
||
class ShallowSimhitClustersProducer : public edm::EDProducer { | ||
public: | ||
explicit ShallowSimhitClustersProducer(const edm::ParameterSet&); | ||
private: | ||
std::vector<edm::InputTag> inputTags; | ||
edm::InputTag theClustersLabel; | ||
std::string Prefix; | ||
|
||
void produce( edm::Event &, const edm::EventSetup & ); | ||
shallow::CLUSTERMAP::const_iterator match_cluster(const unsigned&, | ||
const float&, | ||
const shallow::CLUSTERMAP&, | ||
const edmNew::DetSetVector<SiStripCluster>& ) const; | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef USERCODE_SHALLOWTOOLS_SHALLOWTOOLS | ||
#define USERCODE_SHALLOWTOOLS_SHALLOWTOOLS | ||
|
||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "DataFormats/Common/interface/DetSetVectorNew.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
|
||
class StripGeomDetUnit; | ||
class MagneticField; | ||
class SiStripLorentzAngle; | ||
class Event; | ||
namespace edm {class InputTag;} | ||
|
||
namespace shallow { | ||
|
||
typedef std::map<std::pair<uint32_t, uint16_t>, unsigned int> CLUSTERMAP; | ||
|
||
CLUSTERMAP make_cluster_map( const edm::Event& , edm::InputTag&); | ||
LocalVector drift( const StripGeomDetUnit*, const MagneticField&, const SiStripLorentzAngle&); | ||
int findTrackIndex(const edm::Handle<edm::View<reco::Track> >& h, const reco::Track* t); | ||
|
||
} | ||
|
||
#endif |
18 changes: 18 additions & 0 deletions
18
trunk/CalibTracker/SiStripCommon/interface/ShallowTrackClustersProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef SHALLOW_TRACKCLUSTERS_PRODUCER | ||
#define SHALLOW_TRACKCLUSTERS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
class ShallowTrackClustersProducer : public edm::EDProducer { | ||
public: | ||
explicit ShallowTrackClustersProducer(const edm::ParameterSet&); | ||
private: | ||
edm::InputTag theTracksLabel; | ||
edm::InputTag theClustersLabel; | ||
std::string Suffix; | ||
std::string Prefix; | ||
|
||
void produce( edm::Event &, const edm::EventSetup & ); | ||
}; | ||
#endif |
16 changes: 16 additions & 0 deletions
16
trunk/CalibTracker/SiStripCommon/interface/ShallowTracksProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef SHALLOW_TRACKS_PRODUCER | ||
#define SHALLOW_TRACKS_PRODUCER | ||
|
||
#include "FWCore/Framework/interface/EDProducer.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
|
||
class ShallowTracksProducer : public edm::EDProducer { | ||
public: | ||
explicit ShallowTracksProducer(const edm::ParameterSet&); | ||
private: | ||
edm::InputTag theTracksLabel; | ||
std::string Prefix; | ||
std::string Suffix; | ||
void produce( edm::Event &, const edm::EventSetup & ); | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#ifndef Shallow_Tree_h | ||
#define Shallow_Tree_h | ||
|
||
/** \class ShallowTree | ||
* | ||
* Makes a tree out of C++ standard types and vectors of C++ standard types | ||
* | ||
* This class, which is an EDAnalyzer, takes the same "keep" and | ||
* "drop" outputCommands parameter as the PoolOutputSource, making a | ||
* tree of the selected variables, which it obtains from the EDM | ||
* tree. | ||
* | ||
* See the file python/test_cfg.py for an example configuration. | ||
* | ||
* See the file doc/README for more detailed documentation, including | ||
* advantages, disadvantages, and use philosophy. | ||
* | ||
* $Date: 2008/08/23 16:46:29 $ | ||
* $Revision: 1.1 $ | ||
* \author Burt Betchart - University of Rochester <[email protected]> | ||
*/ | ||
|
||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/EDAnalyzer.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/ServiceRegistry/interface/Service.h" | ||
#include "PhysicsTools/UtilAlgos/interface/TFileService.h" | ||
|
||
#include <string> | ||
#include <vector> | ||
#include <TTree.h> | ||
|
||
class ShallowTree : public edm::EDAnalyzer { | ||
private: | ||
virtual void beginJob(const edm::EventSetup&); | ||
virtual void analyze(const edm::Event&, const edm::EventSetup&); | ||
virtual void endJob(){} | ||
|
||
class BranchConnector { | ||
public: | ||
virtual ~BranchConnector() {}; | ||
virtual void connect(const edm::Event&) = 0; | ||
}; | ||
|
||
template <class T> | ||
class TypedBranchConnector : public BranchConnector { | ||
private: | ||
std::string ml; //module label | ||
std::string pin; //product instance name | ||
T object_; | ||
T* object_ptr_; | ||
public: | ||
TypedBranchConnector(edm::BranchDescription const*, std::string, TTree*); | ||
void connect(const edm::Event&); | ||
}; | ||
|
||
edm::Service<TFileService> fs; | ||
TTree * tree; | ||
std::vector<BranchConnector*> connectors; | ||
edm::ParameterSet pset; | ||
|
||
public: | ||
explicit ShallowTree(const edm::ParameterSet& iConfig) : pset(iConfig) {} | ||
|
||
enum LEAFTYPE {BOOL=1, BOOL_V, | ||
SHORT, SHORT_V, U_SHORT, U_SHORT_V, | ||
INT, INT_V, U_INT, U_INT_V, | ||
FLOAT, FLOAT_V, DOUBLE, DOUBLE_V, | ||
LONG, LONG_V, U_LONG, U_LONG_V }; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.