ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/DTDPGAnalysis/src/STAOfflineAnalyzer.cc
(Generate patch)

Comparing UserCode/DTDPGAnalysis/src/STAOfflineAnalyzer.cc (file contents):
Revision 1.2 by battilan, Sun Nov 2 20:43:11 2008 UTC vs.
Revision 1.4 by pellicci, Wed Jan 30 14:42:51 2013 UTC

# Line 162 | Line 162 | STAOfflineAnalyzer::STAOfflineAnalyzer(c
162   /* Destructor */
163   STAOfflineAnalyzer::~STAOfflineAnalyzer() {
164    theDQMStore->rmdir("DT/STAOfflineAnalyzer");
165  // theFile->cd();
166  // theFile->Write();
167  // theFile->Close();
165   }
166  
167   /* Operations */
# Line 206 | Line 203 | void STAOfflineAnalyzer::analyze(const E
203  
204    if (!mc) {
205      Handle<LTCDigiCollection> ltcdigis;
206 <    event.getByType(ltcdigis);
210 <    //cout << "ltcdigis " << ltcdigis << endl;
206 >    event.getByLabel("none",ltcdigis);
207  
208      for (std::vector<LTCDigi>::const_iterator ltc= ltcdigis->begin(); ltc!=
209           ltcdigis->end(); ++ltc) {
214      //if (debug) cout << (*ltc) << endl;
210        for (int i = 0; i < 6; i++)
211          if ((*ltc).HasTriggered(i)) {
212            LCT.set(i);
# Line 316 | Line 311 | void STAOfflineAnalyzer::analyzeSATrack(
311      Cylinder::RotationType rot0;
312      const Cylinder::CylinderPointer ecal = Cylinder::build(pos0, rot0,
313                                                             radiusECAL);
319    //cout << "Cyl " << ecal->radius() << endl;
314  
315      TrajectoryStateOnSurface tsosAtEcal =
316        thePropagator->propagate(*innerTSOS.freeState(), *ecal);
# Line 426 | Line 420 | void STAOfflineAnalyzer::analyzeSATrack(
420  
421        int nLay=0, nSL=0, nCh=0;
422        for (int c=1; c<=5;++c) {
429        // cout << "c, lh, fh " << c <<" " << firstHitSector << " " <<
430        //   lastHitSector << endl;
423          if (c==5 && firstHitSector==14) firstHitSector=10;
424          else if (c==5 && lastHitSector==14) lastHitSector=10;
425          else if (c==5 && firstHitSector==13) firstHitSector=4;
# Line 443 | Line 435 | void STAOfflineAnalyzer::analyzeSATrack(
435          const DTChamber * ch = dtGeom->chamber(chid);
436  
437          if (hitsPerChamber[chid]==0) {
446          //cout << "Hits missing in " << chid << endl;
438            missingHit(dtGeom, segs, ch, innerTSOS);
439          } else {
440            nCh++;
450          //cout << "Hits in " << chid << " = " << hitsPerChamber[chid]<< endl;
441          }
442          int nLayPerCh=0, nSLPerCh=0;
443 <        for (int sl=1; sl<=3; ++sl) {
444 <          if (sl==2 && cc==4) continue;
445 <          DTSuperLayerId slid(chid, sl);
443 >        for (int i=1; i<=3; ++i) {
444 >          if (i==2 && cc==4) continue;
445 >          DTSuperLayerId slid(chid, i);
446            const DTSuperLayer* sl = dtGeom->superLayer(slid);
447            if (hitsPerSL[slid]==0) {
458            //cout << "Hits missing in " << slid << endl;
448              missingHit(dtGeom, segs2d, sl, innerTSOS);
449            } else {
450              nSL++;
451              nSLPerCh++;
463            //cout << "Hits in " << slid << " = " << hitsPerSL[slid]<< endl;
452            }
453            int nLayPerSL=0;
454            for (int l=1; l<=4; ++l) {
455              DTLayerId lid(slid, l);
456              const DTLayer* lay = dtGeom->layer(lid);
457              if (hitsPerLayer[lid]==0) {
470              //cout << "Hits missing in " << lid << endl;
458                missingHit(dtGeom, hits1d, lay, innerTSOS);
459              } else {
460                nLay++;
461                nLayPerCh++;
462                nLayPerSL++;
476              //cout << "Hits in " << lid << " = " << hitsPerLayer[lid]<< endl;
463              }
464            }
465            histo("hSANLayersPerSL")->Fill(nLayPerSL);
# Line 549 | Line 535 | void STAOfflineAnalyzer::pippo(const DTR
535    histo("hHitsLostChamber")->Fill(nSegsCh);
536    if (nSegsCh) {
537      LocalPoint extrapPos=extraptsos.localPosition();
552    //cout << "Extrap pos " << extrapPos << endl;
538      double minDist=99999.;
539      for (DTRecSegment4DCollection::const_iterator hit=segsch.first; hit!=segsch.second;
540           ++hit) {
556      //cout << "Hit pos " << hit->localPosition() << endl;
541        LocalVector dist = hit->localPosition() - extrapPos;
558      //cout << "dist " << dist << " " << dist.perp() << endl;
542        if (dist.perp()<minDist) minDist=dist.perp();
543      }
544      histo("hMinDistChamber")->Fill(minDist);
# Line 569 | Line 552 | void STAOfflineAnalyzer::pippo(const DTR
552    histo("hHitsLostSL")->Fill(nSegsCh);
553    if (nSegsCh) {
554      LocalPoint extrapPos=extraptsos.localPosition();
572    //cout << "Extrap pos " << extrapPos << endl;
555      double minDist=99999.;
556      for (DTRecSegment2DCollection::const_iterator hit=segsch.first; hit!=segsch.second;
557           ++hit) {
576      //cout << "Hit pos " << hit->localPosition() << endl;
558        LocalVector dist = hit->localPosition() - extrapPos;
578      //cout << "dist " << dist << " " << dist.perp() << endl;
559        if (dist.perp()<minDist) minDist=dist.x();
560      }
561      histo("hMinDistSL")->Fill(minDist);
# Line 589 | Line 569 | void STAOfflineAnalyzer::pippo(const DTR
569    histo("hHitsLostLayer")->Fill(nSegsCh);
570    if (nSegsCh) {
571      LocalPoint extrapPos=extraptsos.localPosition();
592    //cout << "Extrap pos " << extrapPos << endl;
572      double minDist=99999.;
573      for (DTRecHitCollection::const_iterator hit=segsch.first; hit!=segsch.second;
574           ++hit) {
596      //cout << "Hit pos " << hit->localPosition() << endl;
575        LocalVector dist = hit->localPosition() - extrapPos;
598      //cout << "dist " << dist << " " << dist.perp() << endl;
576        if (dist.perp()<minDist) minDist=dist.x();
577      }
578      histo("hMinDistLayer")->Fill(minDist);
# Line 692 | Line 669 | void STAOfflineAnalyzer::createTH2F(cons
669  
670   }
671  
695 DEFINE_FWK_MODULE(STAOfflineAnalyzer);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines