2 #include "CalibTracker/SiStripCommon/interface/TTREE_FOREACH_ENTRY.hh" 5 #include <boost/lexical_cast.hpp> 10 TTREE_FOREACH_ENTRY(tree) {
13 std::vector<unsigned> PLEAF( tsostrackmulti , tree );
14 std::vector<unsigned> PLEAF( clusterdetid , tree );
15 std::vector<unsigned> PLEAF( clusterwidth , tree );
16 std::vector<float> PLEAF( clustervariance , tree );
17 std::vector<float> PLEAF( tsosdriftx , tree );
18 std::vector<float> PLEAF( tsosdriftz , tree );
19 std::vector<float> PLEAF( tsoslocaltheta , tree );
20 std::vector<float> PLEAF( tsoslocalphi , tree );
21 std::vector<float> PLEAF( tsosglobalZofunitlocalY , tree );
23 const unsigned N(clusterdetid.size());
24 std::vector<float> BdotY(
N,0);
if(!
ensembleBins_) { std::vector<float> PLEAF( tsosBdotY , tree );
swap(BdotY, tsosBdotY); }
25 std::vector<float> localy(
N,0);
if(
localYbin_) { std::vector<float> PLEAF( tsoslocaly , tree );
swap(localy, tsoslocaly);}
26 std::vector<unsigned> seedstrip(
N,0);
if(
stripsPerBin_) { std::vector<unsigned> PLEAF( clusterseedstrip , tree );
swap(seedstrip, clusterseedstrip);}
28 for(
unsigned i=0;
i<
N ;
i++) {
34 const int sign = tsosglobalZofunitlocalY[
i] < 0 ? -1 : 1;
35 const float tthetaL = sign * tsosdriftx[
i] / tsosdriftz[
i];
36 const float tthetaT = sign *
tan(tsoslocaltheta[i]) *
cos(tsoslocalphi[i]);
39 granularity(detid, tthetaL, TFE_index, localy[i], seedstrip[i]%128),
40 clusterwidth[i], clustervariance[i], tthetaL, tthetaT, fabs(BdotY[i]) );
48 const unsigned width,
const float variance,
const float tthetaL,
const float tthetaT,
const float BdotY )
const 50 book.
fill( tthetaL, gran+
"_reconstruction", 360,-1.0,1.0 );
51 book.
fill( tthetaT-tthetaL, gran+
allAndOne(width), 360,-1.0,1.0 );
52 book.
fill( tthetaT-tthetaL, variance, gran+
varWidth(width), 360,-1.0,1.0 );
55 book.
fill( BdotY, gran+
"_field", 101,1,5);
56 book.
fill( width, gran+
"_width", 10,0,10);
73 granularity(
const SiStripDetId detid,
const float tthetaL,
const Long64_t TFE_index,
const float localy,
const unsigned apvstrip)
const {
78 if(
localYbin_) gran += (localy < 0 ?
"_yM":
"_yP") + std::to_string(
abs((
int)(localy/
localYbin_+(localy<0?-1:0))));
98 return subdetLabel(detid)+
"_layer"+std::to_string(layer)+(stereo?
"s":
"a");
std::string layerLabel(const SiStripDetId) const
unsigned int tibLayer(const DetId &id) const
uint32_t tobStereo(const DetId &id) const
const Long64_t maxEvents_
poly< std::string > granularity(const SiStripDetId, const float, const Long64_t, const float, const unsigned) const
void fill(TTree *, Book &) const
static std::string moduleLabel(const SiStripDetId)
void swap(Association< C > &lhs, Association< C > &rhs)
Cos< T >::type cos(const T &t)
poly< std::string > varWidth(const unsigned width) const
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static std::string method(Method m, bool fit=true)
Detector identifier class for the strip tracker.
SubDetector subDetector() const
void fill(double_t X, const char *name, uint_t NbinsX, double_t Xlow, double_t Xup, double_t W=1)
const TrackerTopology * tTopo_
static std::string subdetLabel(const SiStripDetId)
const unsigned stripsPerBin_
void fill_one_cluster(Book &, const poly< std::string > &, const unsigned, const float, const float, const float, const float) const
uint32_t tibStereo(const DetId &id) const
const double ensembleLow_
poly< std::string > allAndOne(const unsigned width) const
unsigned int tobLayer(const DetId &id) const