2 #include "CalibTracker/SiStripCommon/interface/TTREE_FOREACH_ENTRY.hh"
5 #include <boost/lexical_cast.hpp>
9 TTREE_FOREACH_ENTRY(tree) {
12 std::vector<unsigned> PLEAF( tsostrackmulti , tree );
13 std::vector<unsigned> PLEAF( clusterdetid , tree );
14 std::vector<unsigned> PLEAF( clusterwidth , tree );
15 std::vector<float> PLEAF( clustervariance , tree );
16 std::vector<float> PLEAF( tsosdriftx , tree );
17 std::vector<float> PLEAF( tsosdriftz , tree );
18 std::vector<float> PLEAF( tsoslocaltheta , tree );
19 std::vector<float> PLEAF( tsoslocalphi , tree );
20 std::vector<float> PLEAF( tsosglobalZofunitlocalY , tree );
22 const unsigned N(clusterdetid.size());
23 std::vector<float> BdotY(
N,0);
if(!
ensembleBins_) { std::vector<float> PLEAF( tsosBdotY , tree );
swap(BdotY, tsosBdotY); }
24 std::vector<float> localy(
N,0);
if(
localYbin_) { std::vector<float> PLEAF( tsoslocaly , tree );
swap(localy, tsoslocaly);}
25 std::vector<unsigned> seedstrip(
N,0);
if(
stripsPerBin_) { std::vector<unsigned> PLEAF( clusterseedstrip , tree );
swap(seedstrip, clusterseedstrip);}
27 for(
unsigned i=0;
i<
N ;
i++) {
33 const int sign = tsosglobalZofunitlocalY[
i] < 0 ? -1 : 1;
34 const float tthetaL = sign * tsosdriftx[
i] / tsosdriftz[
i];
35 const float tthetaT = sign *
tan(tsoslocaltheta[i]) *
cos(tsoslocalphi[i]);
38 granularity(detid, tthetaL, TFE_index, localy[i], seedstrip[i]%128),
39 clusterwidth[i], clustervariance[i], tthetaL, tthetaT, fabs(BdotY[i]) );
47 const unsigned width,
const float variance,
const float tthetaL,
const float tthetaT,
const float BdotY )
const
49 book.
fill( tthetaL, gran+
"_reconstruction", 360,-1.0,1.0 );
50 book.
fill( tthetaT-tthetaL, gran+
allAndOne(width), 360,-1.0,1.0 );
51 book.
fill( tthetaT-tthetaL, variance, gran+
varWidth(width), 360,-1.0,1.0 );
54 book.
fill( BdotY, gran+
"_field", 101,1,5);
55 book.
fill( width, gran+
"_width", 10,0,10);
77 if(
localYbin_) gran += (localy < 0 ?
"_yM":
"_yP") + boost::lexical_cast<std::string>(
abs((
int)(localy/
localYbin_+(localy<0?-1:0))));
94 return subdetLabel(detid)+
"_layer"+boost::lexical_cast<std::string>(layer)+(detid.
stereo()?
"s":
"a");
void swap(ora::Record &rh, ora::Record &lh)
unsigned int layer() const
layer id
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)
static std::string layerLabel(const SiStripDetId)
Cos< T >::type cos(const T &t)
poly< std::string > varWidth(const unsigned width) const
Tan< T >::type tan(const T &t)
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)
static std::string subdetLabel(const SiStripDetId)
unsigned int layer() const
layer id
const unsigned stripsPerBin_
void fill_one_cluster(Book &, const poly< std::string > &, const unsigned, const float, const float, const float, const float) const
const double ensembleLow_
poly< std::string > allAndOne(const unsigned width) const